VS:IFC GetPsetName: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 40: Line 40:


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<return>
===== Return Values =====
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.
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>
</return>
 
-----------------------------------------------------------------------------------------------------------
<remark></remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------

Latest revision as of 08: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