VS:IFC SetPsetProp

From Vectorworks Developer
Revision as of 05:00, 17 December 2018 by Sasha (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

This function sets a value to the selected property of the selected pset.
FUNCTION IFC_SetPsetProp(
hObject  :HANDLE;
inStrPsetName  :STRING;
inStrPropName  :STRING;
inStrPropValue  :STRING) : BOOLEAN;
def vs.IFC_SetPsetProp(hObject, inStrPsetName, inStrPropName, inStrPropValue):
    return BOOLEAN

Parameters

hObject HANDLE Handle to object
inStrPsetName STRING Name of the pset
inStrPropName STRING Name of the property
inStrPropValue STRING Value of the property

Return Value

TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect name of the pset or property.

Example

Assume we have a wall and we want in export to be marked as load-bearing, non-combustible and to put a reference ‘IW-01’, also we want to set thermal transmit-tance value of 0.5 – we need to attach Pset_WallCommon and set its properties ( LoadBearing, Combustible, Reference, ThermalTransmittance) as needed:

VectorScript

PROCEDURE Test;
VAR
	hWall : HANDLE;
	ok : BOOLEAN;
BEGIN
	hWall := FSActLayer;
	ok := IFC_SetIFCEntity(hWall, 'IfcWallStandardCase');
	ok := IFC_AttachPset(hWall, 'Pset_WallCommon');
	ok := IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'LoadBearing', '1');
	ok := IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'Combustible', '0');
	ok := IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'Reference', 'IW-01');
	ok := IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'ThermalTransmittance', '0.5');
END;

RUN(Test);

Python

hWall = vs.FSActLayer()
ok = vs.IFC_SetIFCEntity(hWall, 'IfcWallStandardCase')
ok = vs.IFC_AttachPset(hWall, 'Pset_WallCommon')
ok = vs.IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'LoadBearing', '1')
ok = vs.IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'Combustible', '0')
ok = vs.IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'Reference', 'IW-01')
ok = vs.IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'ThermalTransmittance', '0.5')

Version

Availability: from Vectorworks 2014
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox