VS:IFC GetPsetInfoAt: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 45: | Line 45: | ||
outType | outType | ||
INTEGER | INTEGER | ||
Returns the index that defines the state of the Pset. Possible values are: -2 (pset forbidden from mapping, NOT attached in record), -1 (pset forbidden from mapping, but attached in record), 0 (pset NOT attached), 1 (pset attached from record), 2 (pset attached from mapping). | Returns the index that defines the state of the Pset. Possible values are: '''-2''' (pset forbidden from mapping, NOT attached in record), '''-1''' (pset forbidden from mapping, but attached in record), '''0''' (pset NOT attached), '''1''' (pset attached from record), '''2''' (pset attached from mapping). | ||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 59: | Line 59: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <sample> | ||
==== VectorScript ==== | |||
<code lang="pas"> | |||
PROCEDURE Test; | |||
VAR | |||
hObject : HANDLE; | |||
ok : BOOLEAN; | |||
outName : STRING; | |||
outType : INTEGER; | |||
begin | |||
ok := IFC_GetPsetInfoAt(hObject, true, 0, outName, outType); | |||
END; | |||
RUN(Test); | |||
</code> | |||
==== Python ==== | |||
<code lang="py"> | |||
hObject = vs.Handle() | |||
ok = false | |||
outName = "" | |||
outType = -1 | |||
ok = vs.IFC_GetPsetInfoAt(hObject, true, 0, outName, outType) | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Revision as of 08:18, 18 December 2018
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns the property set name, if it is attached and where from (mapping or record).
FUNCTION IFC_GetPsetInfoAt(
hObject :HANDLE;
bAllPsets :BOOLEAN;
index :INTEGER;
VAR outIfcPsetName :STRING;
VAR outType :INTEGER) : BOOLEAN;
def vs.IFC_GetPsetInfoAt(hObject, bAllPsets, index): return (BOOLEAN, outIfcPsetName, outType)
Parameters
hObject HANDLE Handle to object. bAllPsets BOOLEAN Boolean that defines whether customPsets are to be checked. index INTEGER Index that defines the pset position. outIfcPsetName STRING Out parameter for the property set name. outType INTEGER Returns the index that defines the state of the Pset. Possible values are: -2 (pset forbidden from mapping, NOT attached in record), -1 (pset forbidden from mapping, but attached in record), 0 (pset NOT attached), 1 (pset attached from record), 2 (pset attached from mapping).
Return Value
TRUE on success, FALSE indicates failure.
Example
VectorScript
PROCEDURE Test; VAR hObject : HANDLE; ok : BOOLEAN; outName : STRING; outType : INTEGER; begin ok := IFC_GetPsetInfoAt(hObject, true, 0, outName, outType); END; RUN(Test);
Python
hObject = vs.Handle() ok = false outName = "" outType = -1 ok = vs.IFC_GetPsetInfoAt(hObject, true, 0, outName, outType)
Version
Availability: from Vectorworks 2018