VS:IFC GetNumPsets: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
Line 24: | Line 24: | ||
hObject | hObject | ||
HANDLE | HANDLE | ||
Handle to object | |||
</line> | </line> | ||
<line> | <line> | ||
outNumPsets | outNumPsets | ||
INTEGER | INTEGER | ||
Number of Psets | |||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 35: | Line 35: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark></remark> | <remark> | ||
===== Return Values ===== | |||
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data. | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <sample> | ||
==== VectorScript ==== | |||
<code lang="pas"> | |||
PROCEDURE Test; | |||
VAR | |||
hObject : HANDLE; | |||
iNum : INTEGER; | |||
ok : BOOLEAN; | |||
begin | |||
hObject := FSActLayer; | |||
ok := IFC_GetNumPsets(hObject, iNum); | |||
AlrtDialog(Concat(iNum)); | |||
end; | |||
Run(Test); | |||
</code> | |||
==== Python ==== | |||
<code lang="py"> | |||
ok, iNum = vs.IFC_GetNumPsets(vs.FSActLayer()) | |||
vs.AlrtDialog(str(iNum)) | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Revision as of 09:49, 27 October 2014
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Gets the number of property sets, attached to the object
FUNCTION IFC_GetNumPsets(
hObject :HANDLE;
VAR outNumPsets :INTEGER) : BOOLEAN;
def vs.IFC_GetNumPsets(hObject): return (BOOLEAN, outNumPsets)
Parameters
hObject HANDLE Handle to object outNumPsets INTEGER Number of Psets
Remarks
Return Values
TRUE on success, FALSE indicates failure – incorrect handle, the object has no IFC data.
Example
VectorScript
PROCEDURE Test; VAR hObject : HANDLE; iNum : INTEGER; ok : BOOLEAN; begin hObject := FSActLayer; ok := IFC_GetNumPsets(hObject, iNum); AlrtDialog(Concat(iNum)); end; Run(Test);
Python
ok, iNum = vs.IFC_GetNumPsets(vs.FSActLayer()) vs.AlrtDialog(str(iNum))
Version
Availability: from Vectorworks 2014