API_​LibPart

Definition of a Library Part.

    typedef struct {
        API_LibTypeID      typeID;
        Int32              index;
        GS::uchar_t        docu_UName [API_UniLongNameLen];
        GS::uchar_t        file_UName [API_UniLongNameLen];
        bool               missingDef;
        bool               filler_1;
        bool               isTemplate;
        bool               isPlaceable;
        GSType             ownerID;
        short              version;
        unsigned short     platformSign;
        Int32              filler_2[7];
        IO::Location       *location;
        Int32              filler_3;
        char               ownUnID [128];
        char               parentUnID [128];
    } API_LibPart;

 

Members

typeID
Type of the Library Part
index
Index of the Library Part;
provides the current database index of the given Library Part. Note that this number is not constant for a particular Library Part through the whole life of the project.
docu_UName Changed in API 11
Document name of the Library Part;
it is unique, if more than one Library Part has the same name, only the newest one is registered. Refer to the APIEnv_OverwriteLibPartID function to modify this behavior.
file_UName Changed in API 11
File name of the Library Part
missingDef
The definition is missing
isTemplate
Tells whether this library part is a template.
isPlaceable
Tells whether this library part can be placed.
ownerID
Signature of the owner; used by external objects;
it can either be Archicad itself, or any third party application.
version
Library Part version
platformSign
Library Part platform
location
Location of the library part (GSM) file in the file system
ownUnID
The own GUID of the library part.
parentUnID
The GUID of the parent library part subtype in the hierarchy. For more details see Library Part Subtypes.

 

Remarks

This structure is definition of the library part.

Note, that it is strongly advised to define the file and document name to the same one, because of the Windows/Mac compatibility. The document name terminology was introduced when the Windows platform restricted the filenames to be in 8.3 form.

Do not forget to delete the dynamically allocated location pointer after library part operations.

 

Requirements

Version: API 1.3 or later
Header: APIdefs_LibraryParts.h

 

See Also

API_LibTypeID
APIEnv_OverwriteLibPartID
LibPart Manager
Library Part Subtypes
API Types