VS:IFC GetIFCEntity: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
Line 5: | Line 5: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
This function gets IFC entity name for the given object. | |||
</desc> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
Line 24: | Line 25: | ||
hObject | hObject | ||
HANDLE | HANDLE | ||
Handle to object | |||
</line> | </line> | ||
Line 29: | Line 31: | ||
outStrName | outStrName | ||
STRING | STRING | ||
Name of the IFC entity | |||
</line> | </line> | ||
Line 35: | Line 38: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark></remark> | <remark> | ||
===== Return Values ===== | |||
TRUE on success, FALSE indicates failure – incorrect handle or the object has no IFC data. | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <sample> | ||
Try to get the IFC entity name for the given object: | |||
==== VectorScript ==== | |||
<code lang="pas"> | |||
PROCEDURE Test; | |||
VAR | |||
strName : STRING; | |||
hObject : HANDLE; | |||
ok : BOOLEAN; | |||
begin | |||
hObject := FSActLayer; | |||
ok := IFC_GetIFCEntity(hObject, strName); | |||
AlrtDialog(strName); | |||
end; | |||
Run(Test); | |||
</code> | |||
==== Python ==== | |||
<code lang="py"> | |||
hObject = vs.FSActLayer() | |||
ok, strName = vs.IFC_GetIFCEntity(hObject) | |||
vs.AlrtDialog(strName) | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Revision as of 09:26, 27 October 2014
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
This function gets IFC entity name for the given object.
FUNCTION IFC_GetIFCEntity(
hObject :HANDLE;
VAR outStrName :STRING) : BOOLEAN;
def vs.IFC_GetIFCEntity(hObject): return (BOOLEAN, outStrName)
Parameters
hObject HANDLE Handle to object outStrName STRING Name of the IFC entity
Remarks
Return Values
TRUE on success, FALSE indicates failure – incorrect handle or the object has no IFC data.
Example
Try to get the IFC entity name for the given object:
VectorScript
PROCEDURE Test; VAR strName : STRING; hObject : HANDLE; ok : BOOLEAN; begin hObject := FSActLayer; ok := IFC_GetIFCEntity(hObject, strName); AlrtDialog(strName); end; Run(Test);
Python
hObject = vs.FSActLayer() ok, strName = vs.IFC_GetIFCEntity(hObject) vs.AlrtDialog(strName)
Version
Availability: from Vectorworks 2014