VS:IFC AttachPset: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
< | <return> | ||
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect pset name. | TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect pset name. | ||
Note that, in order to attach the desired pset, you have to attach IFC entity before. | Note that, in order to attach the desired pset, you have to attach IFC entity before. | ||
</remark> | </return> | ||
----------------------------------------------------------------------------------------------------------- | |||
<remark></remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 08:44, 17 December 2018
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Attaches a property set to the object
FUNCTION IFC_AttachPset(
hObject :HANDLE;
inStrPsetName :STRING) : BOOLEAN;
def vs.IFC_AttachPset(hObject, inStrPsetName): return BOOLEAN
Parameters
hObject HANDLE Handle to object inStrPsetName STRING of the pset
Return Value
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect pset name.
Note that, in order to attach the desired pset, you have to attach IFC entity before.
Example
Assume we want an object to be exported as a space with attached Pset_SpaceFireSafetyRequirements (first we have to attach IfcSpace with mandatory and enumerational properties and then the pset):
VectorScript
PROCEDURE Test; VAR hSpace : HANDLE; ok : BOOLEAN; begin ok := IFC_SetIFCEntity(hSpace, 'IfcSpace'); ok := IFC_SetEntityProp(hSpace, 'CompositionType', 'ELEMENT'); ok := IFC_SetEntityProp(hSpace, 'InteriorOrExteriorSpace', 'INTERIOR'); ok := IFC_AttachPset(hSpace, 'Pset_SpaceFireSafetyRequirements'); END; RUN(Test);
Python
hSpace = vs.FSActLayer() ok = vs.IFC_SetIFCEntity(hSpace, 'IfcSpace') ok = vs.IFC_SetEntityProp(hSpace, 'CompositionType', 'ELEMENT') ok = vs.IFC_SetEntityProp(hSpace, 'InteriorOrExteriorSpace', 'INTERIOR') ok = vs.IFC_AttachPset(hSpace, 'Pset_SpaceFireSafetyRequirements')
Version
Availability: from Vectorworks 2014