Difference between revisions of "VS:IFC GetPsetName"

From Vectorworks Developer
Jump to: navigation, search
 
 
(8 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<desc>
 
<desc>
This function gets the name of the Pset at specified index.
+
Gets the name of the property set at that index</desc>
</desc>
+
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<def>
 
<def>
 
<funcDef lang="vs">
 
<funcDef lang="vs">
FUNCTION IFC_GetPsetName(hObject: HANDLE; inPsetIndex: INTEGER; VAR outStrPsetName: STRING) : BOOLEAN;
+
FUNCTION IFC_GetPsetName(hObject:HANDLE; inPsetIndex:INTEGER; VAR outStrPsetName:STRING) : BOOLEAN;
 
</funcDef>
 
</funcDef>
 
<funcDef lang="py">
 
<funcDef lang="py">
def vs.IFC_GetPsetName(hObject, inPsetIndex, RETURN):
+
def vs.IFC_GetPsetName(hObject, inPsetIndex):
     return outStrPsetName
+
     return ok, outStrPsetName
 
</funcDef>
 
</funcDef>
 
</def>
 
</def>
Line 25: Line 24:
 
hObject
 
hObject
 
HANDLE
 
HANDLE
 
+
Handle to object
 
</line>
 
</line>
 
<line>
 
<line>
 
inPsetIndex
 
inPsetIndex
 
INTEGER
 
INTEGER
 
+
of the property
 
</line>
 
</line>
 
<line>
 
<line>
 
outStrPsetName
 
outStrPsetName
 
STRING
 
STRING
 
+
Name of the pset
 
</line>
 
</line>
 
</lineList>
 
</lineList>
 
</params>
 
</params>
 
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<return>
 
<return>
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, index out of range;
+
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, index out of range.
 +
 
 +
Use this function in conjunction with IFC_GetNumPsets. If inPsetIndex = 1, the function will return the name of the first pset, attached to the object.
 
</return>
 
</return>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<remark>
+
<remark></remark>
Use this function in conjunction with IFC_GetNumPsets. If inPsetIndex = 1, the function will return the name of the first pset, attached to the object.
+
</remark>
+
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<sample>
 
<sample>
 +
==== VectorScript ====
 
<code lang="pas">
 
<code lang="pas">
IFC_GetPsetName(hObject, 1, outStrPsetName);
+
PROCEDURE Test;
 +
VAR
 +
hObject : HANDLE;
 +
outStrPsetName : STRING;
 +
ok : BOOLEAN;
 +
BEGIN
 +
hObject := FSActLayer;
 +
ok := IFC_GetPsetName(hObject, 1, outStrPsetName);
 +
AlrtDialog(outStrPsetName);
 +
END;
 +
 
 +
RUN(Test);
 +
</code>
 +
==== Python ====
 +
<code lang="py">
 +
hObject = vs.FSActLayer()
 +
ok, outStrPsetName = vs. IFC_GetPsetName(hObject, 1)
 +
if ok:
 +
vs.AlrtDialog(outStrPsetName)
 
</code>
 
</code>
 
 
</sample>
 
</sample>
 +
 +
-----------------------------------------------------------------------------------------------------------
 +
<seeAlso></seeAlso>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
 
<version>
 
<version>
Availability: 2010
+
Availability: from Vectorworks 2014
  
 
</version>
 
</version>
 
-----------------------------------------------------------------------------------------------------------
 
<seeAlso>
 
</seeAlso>
 
  
 
</vwDoc>
 
</vwDoc>

Latest revision as of 03:59, 17 December 2018

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

Description

Gets the name of the property set at that index
FUNCTION IFC_GetPsetName(
hObject  :HANDLE;
inPsetIndex  :INTEGER;
VAR outStrPsetName  :STRING) : BOOLEAN;
def vs.IFC_GetPsetName(hObject, inPsetIndex):
    return ok, outStrPsetName

Parameters

hObject HANDLE Handle to object
inPsetIndex INTEGER of the property
outStrPsetName STRING Name of the pset

Return Value

TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data, index out of range.

Use this function in conjunction with IFC_GetNumPsets. If inPsetIndex = 1, the function will return the name of the first pset, attached to the object.

Example

VectorScript

PROCEDURE Test;
VAR
	hObject : HANDLE;
	outStrPsetName : STRING;
	ok : BOOLEAN;
BEGIN
	hObject := FSActLayer;
	ok := IFC_GetPsetName(hObject, 1, outStrPsetName);
	AlrtDialog(outStrPsetName);
END;

RUN(Test);

Python

hObject = vs.FSActLayer()
ok, outStrPsetName = vs. IFC_GetPsetName(hObject, 1)
if ok:
	vs.AlrtDialog(outStrPsetName)

Version

Availability: from Vectorworks 2014
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox