Identification parameters of a project window or window related database.
typedef struct {
API_WindowTypeID typeID;
Int32 index;
API_DatabaseUnId databaseUnId;
API_DatabaseUnId masterLayoutUnId;
GS::uchar_t title[API_UniLongNameLen];
GS::uchar_t name[API_UniLongNameLen];
GS::uchar_t ref[API_UniLongNameLen];
API_Guid linkedElement;
API_DatabaseUnId linkedDatabaseUnId;
Int32 linkedSegmentMemoIndex;
Int32 filler_1[3];
} API_WindowInfo, API_DatabaseInfo;
Members
- typeID
- the window/database type identifier
- index

- usually the database/window index (the refCon value in case of custom windows, not used for Section/Elevation Detail and Worksheet database/window).
- databaseUnId
- Section/Elevation/Interior Elevation, Detail and Worksheet database/window unique identifier
- masterLayoutUnId

- for Layouts only; database unique ID of the master layout
- title

- the title of the database (Unicode string), as it is displayed on the window title bar (generally “ref”+” “+”name”)
- name

- the name of the database (Unicode string)
- ref

- reference string/id of the database
- linkedElement

- Element linked to the database (e.g. section to a section database) except for drawing databases where it is the drawing element’s guid
- linkedDatabaseUnId

- For databases linked to elements (section, detail, etc.): the database containing the element.
- linkedSegmentMemoIndex

- For interior elevations only; the section segment index in the element memo.
Remarks
Database/window reference is used for several purposes:
- Returned while asking for the active window or database (APIDb_GetCurrentWindowID, APIDb_GetCurrentDatabaseID)
- Must be setup when changing the current window or database (APIDo_ChangeWindowID, APIDb_ChangeCurrentDatabaseID)
- Defines the database when creating/modifying/deleting an independent detail, worksheet, layout or master layout database (APIDb_NewDatabaseID, APIDb_ModifyDatabaseID, APIDb_DeleteDatabaseID)
The databases are referenced with their unique ID, except Floor Plan, 3D Model and custom window databases. The unique IDs can be found in the connecting elements (API_CutPlaneType, API_DetailType, API_WorksheetType), or can be listed for independent detail, worksheet, layout and master layout databases (APIDb_GetDetailDatabasesID, APIDb_GetWorksheetDatabasesID, APIDb_GetLayoutDatabasesID, APIDb_GetMasterLayoutDatabasesID respectively).
In case of Floor Plan and 3D Model databases the typeID field is enough to identify them. Custom API windows (APIWind_MyDrawID, APIWind_MyTextID) are identified with typeID and index.
With this structure you can retrieve the name, the title and the reference ID of a given window/database (see APIDb_GetDatabaseInfoID). You can also rename independent detail, worksheet, layout and master layout databases using the name and ref fields in APIDb_ModifyDatabaseID.
Requirements
- Version: API 2.1 or later
- Header: APIdefs_Database.h
See Also
API_WindowTypeID, API_DatabaseUnId
API_CutPlaneType, API_ElevationType, API_InteriorElevationType, API_DetailType, API_WorksheetType
API Types, API_DatabaseID