Difference between revisions of "VS:IFC GetPsetProp"

From Vectorworks Developer
Jump to: navigation, search
 
 
(5 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<desc>
 
<desc>
This function gets the value of the selected property of the selected pset.
+
Gets the value and type of a selected property from a property set</desc>
</desc>
+
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<def>
 
<def>
 
<funcDef lang="vs">
 
<funcDef lang="vs">
FUNCTION IFC_GetPsetProp(hObject: HANDLE; inStrPsetName: STRING; inStrPropName: STRING; VAR outStrPropValue: STRING; VAR outTypeSelect: INTEGER) : BOOLEAN;
+
FUNCTION IFC_GetPsetProp(hObject:HANDLE; inStrPsetName:STRING; inStrPropName:STRING; VAR outStrPropValue:STRING; VAR outTypeSelect:INTEGER) : BOOLEAN;
 
</funcDef>
 
</funcDef>
 
<funcDef lang="py">
 
<funcDef lang="py">
Line 25: Line 24:
 
hObject
 
hObject
 
HANDLE
 
HANDLE
 
+
Handle to object
 
</line>
 
</line>
 
<line>
 
<line>
 
inStrPsetName
 
inStrPsetName
 
STRING
 
STRING
 
+
Name of the pset
 
</line>
 
</line>
 
<line>
 
<line>
 
inStrPropName
 
inStrPropName
 
STRING
 
STRING
 
+
Name of the property
 
</line>
 
</line>
 
<line>
 
<line>
 
outStrPropValue
 
outStrPropValue
 
STRING
 
STRING
 
+
Value of the property
 
</line>
 
</line>
 
<line>
 
<line>
 
outTypeSelect
 
outTypeSelect
 
INTEGER
 
INTEGER
 
+
Type of the property
 
</line>
 
</line>
 
</lineList>
 
</lineList>
 
</params>
 
</params>
 
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<return>
 
<return>
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect name of the pset or property;
+
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, incorrect name of the pset or property.
 +
 
 +
outTypeSelect – value depends on the property type: 1 – identifier, 2 – double, 3 – boolean, 4 – integer, 5 – number (same as double), 6 – logical, 7 – string, 8 – enu-meration, 9 – select value.
 
</return>
 
</return>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<remark>
+
<remark></remark>
outTypeSelect – value depends on the property type:
+
:*1 – identifier,
+
:*2 – double,
+
:*3 – boolean,
+
:*4 – integer,
+
:*5 – number (same as double),
+
:*6 – logical,
+
:*7 – string,
+
:*8 – enu-meration,
+
:*9 – select value;
+
</remark>
+
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<sample>
 
<sample>
 +
==== VectorScript ====
 
<code lang="pas">
 
<code lang="pas">
IFC_SetPsetProp(hWall, 'Pset_WallCommon', 'Reference', outValue, iType);
+
PROCEDURE Test;
 +
VAR
 +
hWall : HANDLE;
 +
outValue : STRING;
 +
iType : INTEGER;
 +
ok : BOOLEAN;
 +
begin
 +
hWall := FSActLayer;
 +
ok := IFC_GetPsetProp(hWall, 'Pset_WallCommon', 'Reference', outValue, iType);
 +
AlrtDialog(Concat(outValue, ', ', iType));
 +
END;
 +
 
 +
RUN(Test);
 +
</code>
 +
==== Python ====
 +
<code lang="py">
 +
hWall = vs.FSActLayer()
 +
ok, outValue, iType  = vs.IFC_GetPsetProp(hWall, 'Pset_WallCommon', 'Reference')
 +
vs.AlrtDialog(outValue + ', ' + str(iType))
 
</code>
 
</code>
 
 
 
</sample>
 
</sample>
 +
 +
-----------------------------------------------------------------------------------------------------------
 +
<seeAlso></seeAlso>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
Availability: 2010
+
Availability: from Vectorworks 2014
  
 
</version>
 
</version>
 
-----------------------------------------------------------------------------------------------------------
 
<seeAlso>
 
</seeAlso>
 
  
 
</vwDoc>
 
</vwDoc>

Latest revision as of 04:59, 17 December 2018

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

Description

Gets the value and type of a selected property from a property set
FUNCTION IFC_GetPsetProp(
hObject  :HANDLE;
inStrPsetName  :STRING;
inStrPropName  :STRING;
VAR outStrPropValue  :STRING;
VAR outTypeSelect  :INTEGER) : BOOLEAN;
def vs.IFC_GetPsetProp(hObject, inStrPsetName, inStrPropName):
    return (BOOLEAN, outStrPropValue, outTypeSelect)

Parameters

hObject HANDLE Handle to object
inStrPsetName STRING Name of the pset
inStrPropName STRING Name of the property
outStrPropValue STRING Value of the property
outTypeSelect INTEGER Type 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.

outTypeSelect – value depends on the property type: 1 – identifier, 2 – double, 3 – boolean, 4 – integer, 5 – number (same as double), 6 – logical, 7 – string, 8 – enu-meration, 9 – select value.

Example

VectorScript

PROCEDURE Test;
VAR
	hWall : HANDLE;
	outValue : STRING;
	iType : INTEGER;
	ok : BOOLEAN;
BEGIN
	hWall := FSActLayer;
	ok := IFC_GetPsetProp(hWall, 'Pset_WallCommon', 'Reference', outValue, iType);
	AlrtDialog(Concat(outValue, ', ', iType));
END;

RUN(Test);

Python

hWall = vs.FSActLayer()
ok, outValue, iType  = vs.IFC_GetPsetProp(hWall, 'Pset_WallCommon', 'Reference')
vs.AlrtDialog(outValue + ', ' + str(iType))

Version

Availability: from Vectorworks 2014
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox