VS:IFC ImportLibrary: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
Imports IFC Library of objects</desc> | Imports IFC Library of objects.</desc> | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
Line 24: | Line 24: | ||
strFilePath | strFilePath | ||
STRING | STRING | ||
Path to the Folder with IFC files | |||
</line> | </line> | ||
<line> | <line> | ||
bKeepHierarchy | bKeepHierarchy | ||
BOOLEAN | BOOLEAN | ||
Boolean that determines whether the hierarchy of the library is preserved in the Symbol Folder hierarchy. | |||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 35: | Line 35: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
< | <return></return> | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <remark> | ||
This function is used when importing more than one IFC files simultaneously. | |||
Please note that a Symbol Folder in the Resource Manager is created and every file is imported as a separate symbol. If the main folder contains a hierarchy of folders with more IFC files, the hierarchy can be conveyed in the Symbol Folder by setting bKeepHierarchy boolean to TRUE. | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | |||
<sample> | |||
==== VectorScript ==== | |||
<code lang="pas"> | |||
PROCEDURE ImportLibrary; | |||
VAR | |||
bKeepHierarchy : BOOLEAN | |||
bOK : BOOLEAN | |||
strFilePath : STRING | |||
BEGIN | |||
{We suggest that the path to the library that contains the IFC files is "D:\Files\IFCLibrary"} | |||
bKeepHierarchy := TRUE; | |||
strFilePath := "D:\Files\IFCLibrary"; | |||
bOK := IFC_ImportLibrary( strFilePath, bKeepHierarchy ); | |||
END; | |||
RUN(ImportLibrary); | |||
</code> | |||
==== Python ==== | |||
<code lang="py"> | |||
# We suggest that the path to the library that contains the IFC files is "D:\Files\IFCLibrary" | |||
ok = vs.IFC_ImportLibrary( "D:\Files\IFCLibrary", True ); | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 13:44, 6 April 2023
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Imports IFC Library of objects.
FUNCTION IFC_ImportLibrary(
strFilePath :STRING;
bKeepHierarchy :BOOLEAN) : BOOLEAN;
def vs.IFC_ImportLibrary(strFilePath, bKeepHierarchy): return BOOLEAN
Parameters
strFilePath STRING Path to the Folder with IFC files bKeepHierarchy BOOLEAN Boolean that determines whether the hierarchy of the library is preserved in the Symbol Folder hierarchy.
Remarks
This function is used when importing more than one IFC files simultaneously.
Please note that a Symbol Folder in the Resource Manager is created and every file is imported as a separate symbol. If the main folder contains a hierarchy of folders with more IFC files, the hierarchy can be conveyed in the Symbol Folder by setting bKeepHierarchy boolean to TRUE.
Example
VectorScript
PROCEDURE ImportLibrary; VAR bKeepHierarchy : BOOLEAN bOK : BOOLEAN strFilePath : STRING BEGIN {We suggest that the path to the library that contains the IFC files is "D:\Files\IFCLibrary"} bKeepHierarchy := TRUE; strFilePath := "D:\Files\IFCLibrary"; bOK := IFC_ImportLibrary( strFilePath, bKeepHierarchy ); END; RUN(ImportLibrary);
Python
# We suggest that the path to the library that contains the IFC files is "D:\Files\IFCLibrary" ok = vs.IFC_ImportLibrary( "D:\Files\IFCLibrary", True );
Version
Availability: from Vectorworks 2014