Archicad 27 C++ API
Loading...
Searching...
No Matches
Project Navigator

Functions related to the iteration and manipulation of the items of the Project Navigator. More...

Classes

struct  API_Attr_Head
 Contains common information related to all attribute types. More...
 
struct  API_SubSet
 Represents a Subset in the Layout Book. More...
 
struct  API_LayoutBook
 Represents the Book settings. More...
 
struct  API_UIStructureDisplay
 This structure represents the Partial Structure Display state. More...
 
struct  API_LengthDimFormat
 The representation of the linear, radial, level, elevation, door/window and parapet dimensioning on the Preferences / Dimensioning tab page. More...
 
struct  API_AngleDimFormat
 The representation of the angle dimensioning on the Preferences / Dimensioning tab page. More...
 
struct  API_AreaDimFormat
 The representation of the area dimensioning on the Preferences / Dimensioning tab page. More...
 
struct  API_LayoutInfo
 Properties of an Archicad Layout. More...
 
struct  API_NavigatorSet
 Parameters of a project Navigator Set. More...
 
struct  API_NavigatorItem
 Represents a Project Navigator item. More...
 
struct  API_NavigatorView
 Representation of a Navigator view item. More...
 
struct  API_NavigatorAddOnViewPointData
 Describes a Navigator AddOn viewpoint root, group or leaf node. More...
 
struct  API_GDLModelViewOptions
 Represents the GDL related model view options. More...
 
struct  API_CurtainWallModelViewOptions
 Represents the model view options of Curtain Walls made with the Curtain Wall Tool. The entire structure is Archicad only. More...
 
struct  API_StairModelViewOptions
 Represents the model view options of Stairs made with Stair Tool. The entire structure is Archicad only. More...
 
struct  API_RailingModelViewOptions
 Represents the model view options of Railings made with Railing Tool. The entire structure is Archicad only. More...
 
struct  API_ModelViewOptions
 Represents the model view options. More...
 
struct  API_ModelViewOptions_Head
 Contains common information related to API_ModelViewOptionsType types. More...
 
struct  API_ModelViewOptionsType
 Representation of the model view options. More...
 
struct  API_OnScreenViewOptions
 Representation of the display only options. More...
 
struct  API_ViewOptions
 Describes various display output options. More...
 
struct  API_DimensionStandards_Head
 Contains common information related to dimension preference types. More...
 
struct  API_DimensionStandardsType
 Representation of the dimension preference. More...
 
struct  INavigatorCallbackInterface
 Callback interface object to register with ACAPI_Navigator_RegisterCallbackInterface. More...
 

Enumerations

enum  API_AttrTypeID : int {
  API_ZombieAttrID = 0 , API_FirstAttributeID , API_LayerID = API_FirstAttributeID , API_LinetypeID ,
  API_FilltypeID , API_CompWallID , API_MaterialID , API_LayerCombID ,
  API_ZoneCatID , API_ProfileID , API_PenTableID , API_MEPSystemID ,
  API_OperationProfileID , API_BuildingMaterialID , API_LastAttributeID = API_BuildingMaterialID
}
 The type of an attribute. More...
 
enum  API_NumberingStyle {
  API_NS_Undefined = 0 , API_NS_abc = 1 , API_NS_ABC = 2 , API_NS_1 = 3 ,
  API_NS_01 = 4 , API_NS_001 = 5 , API_NS_0001 = 6 , API_NS_noID = 8
}
 Describes the Layout ID styles. More...
 
enum class  API_LengthTypeID {
  Meter , Decimeter , Centimeter , Millimeter ,
  FootFracInch , FootDecInch , DecFoot , FracInch ,
  DecInch , KiloMeter , Yard
}
 Possible values for length unit preferences. More...
 
enum class  API_AreaTypeID {
  SquareMeter , SquareKiloMeter , SquareDeciMeter , SquareCentimeter ,
  SquareMillimeter , SquareFoot , SquareInch , SquareYard
}
 Possible values for area unit preferences. More...
 
enum class  API_AngleTypeID {
  DecimalDegree , DegreeMinSec , Grad , Radian ,
  Surveyors
}
 Possible values for angle unit preferences.
 
enum  API_ExtraAccuracyID {
  APIExtAc_Off = 0 , APIExtAc_Small5 = 1 , APIExtAc_Small25 = 2 , APIExtAc_Small1 = 3 ,
  APIExtAc_Small01 = 4 , APIExtAc_Fractions = 10
}
 European methods for rounding decimal values.
 
enum  API_NavigatorItemTypeID {
  API_UndefinedNavItem = 0 , API_ProjectNavItem = 1 , API_StoryNavItem = 2 , API_SectionNavItem = 3 ,
  API_DetailDrawingNavItem = 4 , API_PerspectiveNavItem = 5 , API_AxonometryNavItem = 6 , API_ListNavItem = 7 ,
  API_ScheduleNavItem = 8 , API_TocNavItem = 9 , API_CameraNavItem = 10 , API_CameraSetNavItem = 11 ,
  API_InfoNavItem = 12 , API_HelpNavItem = 13 , API_LayoutNavItem = 14 , API_MasterLayoutNavItem = 15 ,
  API_BookNavItem = 16 , API_MasterFolderNavItem = 17 , API_SubSetNavItem = 18 , API_TextListNavItem = 19 ,
  API_ElevationNavItem = 20 , API_InteriorElevationNavItem = 21 , API_WorksheetDrawingNavItem = 22 , API_DocumentFrom3DNavItem = 23 ,
  API_FolderNavItem = 24 , API_DrawingNavItem = 25
}
 Enumeration of Project Navigator items. More...
 
enum  API_NavigatorAddOnViewPointTypeID { API_NavigatorAddOnViewPointUndefinedID = 0 , API_NavigatorAddOnViewPointRootID = 1 , API_NavigatorAddOnViewPointGroupID = 2 , API_NavigatorAddOnViewPointNodeID = 3 }
 Describes the type of a Navigator AddOn item.
 

Functions

GSErrCode __ACENV_CALL ACAPI_Navigator_GetSubSetDefault (API_SubSet *subSet)
 Retrieves the default Subset settings of the Layout Book.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_CreateSubSet (const API_SubSet *subSet, const API_Guid *parentGuid=nullptr)
 Creates the Subset in the Layout Book.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetSubSet (const API_Guid *guid, API_SubSet *subSet)
 Retrieves the Subset settings of the given Layout Subset.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetLayoutBook (API_LayoutBook *book)
 Retrieves the Book Settings.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetViewOptions (API_ViewOptions *viewOptions, short *attrIndex=nullptr)
 Returns the actual view display options.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeViewOptions (API_ViewOptions *viewOptions, short *modelViewOptionAttributeIndex=nullptr)
 Changes the actual model view options.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_CreateLayout (API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId, API_Guid *parent=nullptr)
 Creates a new layout.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetLayoutSets (API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId=nullptr, const ULong *actualPageIndex=nullptr)
 Returns the settings of a layout.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeLayoutSets (const API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId)
 Changes the settings of the current layout in Archicad.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetCurrLayerComb (API_AttributeIndex *layerCombIndex)
 Retrieves the index of the current layer combination.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeCurrLayerComb (API_AttributeIndex *layerCombIndex)
 Activates a layer combination.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetStructureDisplay (API_UIStructureDisplay *uiStructureDisplay)
 Changes the partial structure display options for the current database.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeStructureDisplay (API_UIStructureDisplay *uiStructureDisplay)
 Changes the partial structure display options for the current database.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_SetMasterLayoutOnLayout (const API_DatabaseUnId *databaseUnId=nullptr)
 Sets the layout context of current database for drawing.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorSetNum (Int32 *setNum)
 Retrieves the number of Publisher Sets.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorSet (API_NavigatorSet *navigatorSet, Int32 *index=nullptr)
 Retrieves information of a Project Navigator Map or Publisher Set.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorItem (const API_Guid *guid, API_NavigatorItem *navigatorItem)
 Retrieves a navigator item.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorParentItem (const API_Guid *guid, API_NavigatorItem *parent)
 Retrieves the parent item of a navigator item.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorChildNum (API_NavigatorItem *parent, Int32 *num)
 Retrieves the number of children of a navigator item.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorChildrenItems (API_NavigatorItem *item, GS::Array< API_NavigatorItem > *items)
 Retrieves the child items of a navigator item.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorView (API_NavigatorItem *navigatorItem, API_NavigatorView *navigatorView)
 Retrives a navigator view.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_SearchNavigatorItem (API_NavigatorItem *item, GS::Array< API_NavigatorItem > *items)
 Searches the navigator items of the requested database.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorView (API_NavigatorItem *navigatorItem, API_NavigatorView *navigatorView)
 Sets the given Project Navigator item and its view settings.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_NewNavigatorView (API_NavigatorItem *navigatorItem, API_NavigatorView *navigatorView, const GS::Guid *parent=nullptr, const GS::Guid *previousSibling=nullptr)
 Creates a new Navigator View.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_DeleteNavigatorView (const API_Guid *viewGuid, const bool *silentMode)
 Deletes the given navigator view.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorItem (API_NavigatorItem *navigatorItem)
 Modifies the given Project Navigator item.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_SetNavigatorItemPosition (const GS::Guid *source, const GS::Guid *parent, const GS::Guid *child)
 With this function a navigator item can be moved to an other place. It can be used with items on the layout map and on the view maps (in case of teamworking on the public and on the users' own view map as well.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_CloneProjectMapItemToViewMap (const API_Guid *sourceItemId, const API_Guid *parentItemId, API_Guid *createdItemId)
 Clones a Navigator item from the project map to view map.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_CreateNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Creates a new Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_DeleteNavigatorVPItem (const API_Guid *guid)
 Deletes a Navigator viewpoint root, group or leaf node from the Project Map.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Changes an existing Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Gets information about an existing Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPRootGroups (GS::Array< API_Guid > *rootGuids)
 Gets the list of Navigator viewpoint roots.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPItemChildren (const API_Guid *guid, GS::Array< API_Guid > *childrenGuids)
 Gets the list of child viewpoint groups/nodes of a Navigator viewpoint root or group.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_RegisterCallbackInterface (INavigatorCallbackInterface *callBackInterface)
 Registers an object with virtual functions that is implemented by the AddOn, and on certain events called by Archicad.
 
void __ACENV_CALL ACAPI_FreeGDLModelViewOptionsPtr (API_GDLModelViewOptions **gdlModelViewOptions)
 Frees the GDL model view options pointer.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_Search (API_DimensionStandards_Head *dimStandHead)
 Search a dimension preference by name or index.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_GetNum (UInt32 &count)
 Get the number of dimension preferences.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_Get (API_DimensionStandardsType &dimStand)
 Get a dimension preference by index or name.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ModelViewOptions_Search (API_ModelViewOptions_Head *mvoHead)
 Search an API_ModelViewOptions_Head by name or index.
 
void __ACENV_CALL ACAPI_Navigator_ModelViewOptions_GetNum (UInt32 &count)
 Get the number of API_ModelViewOptions.
 
GSErrCode __ACENV_CALL ACAPI_Navigator_ModelViewOptions_Get (API_ModelViewOptionsType *modelViewOpt)
 Get an API_ModelViewOptionsType by index.
 

Detailed Description

Functions related to the iteration and manipulation of the items of the Project Navigator.

Enumeration Type Documentation

◆ API_AreaTypeID

enum class API_AreaTypeID
strong

Possible values for area unit preferences.

Since
Archicad 26

◆ API_AttrTypeID

enum API_AttrTypeID : int

The type of an attribute.

Since
Archicad 26
Remarks
This is a general constant which describes the different attributes types, and is used in most attribute-related operations. Refer to the API_Attr_Head structure to get more details on it.

◆ API_LengthTypeID

enum class API_LengthTypeID
strong

Possible values for length unit preferences.

Since
Archicad 26

◆ API_NavigatorItemTypeID

Enumeration of Project Navigator items.

Remarks
This type identifier can be used as itemType in API_NavigatorItem structure.

◆ API_NumberingStyle

Describes the Layout ID styles.

Remarks
API_SubSet contains this structure. ACAPI_Navigator_CreateSubSet function creates a Subset in the Layout Book.

Function Documentation

◆ ACAPI_FreeGDLModelViewOptionsPtr()

void __ACENV_CALL ACAPI_FreeGDLModelViewOptionsPtr ( API_GDLModelViewOptions **  gdlModelViewOptions)

Frees the GDL model view options pointer.

Parameters
gdlModelViewOptions[in] A pointer to an array of API_GDLModelViewOptions.
Returns
Remarks
This is the recommended way of disposing the gdlOptions member of API_ModelViewOptions structure.

◆ ACAPI_Navigator_ChangeCurrLayerComb()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeCurrLayerComb ( API_AttributeIndex layerCombIndex)

Activates a layer combination.

Parameters
layerCombIndex[in] index of the layer combination to be activated
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - layerCombInd is nullptr
  • APIERR_BADINDEX - layerCombInd is out of range
Remarks
This function puts the given layer combination into effect. The currently active layer combination can be retrieved with the ACAPI_Navigator_GetCurrLayerComb environment function. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Navigator_ChangeLayoutSets()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeLayoutSets ( const API_LayoutInfo layoutInfo,
API_DatabaseUnId databaseUnId 
)

Changes the settings of the current layout in Archicad.

Parameters
layoutInfo[in] Properties of the layout.
databaseUnId[in] apply changes to this database (can be nullptr). The changes are applied to the current layout or master layout database if this parameter is omitted, otherwise to the given database.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - layoutInfo is nullptr
  • APIERR_GENERAL - No master layout, or the function failed
Remarks
This function is used to modify the current (master) layout parameters such as size and margin values. The size and margins are always applied to the master layout. This function does not modify the name of the layout. This can be done with ACAPI_Database_ModifyDatabase database function. The actual settings can be retrieved with the ACAPI_Navigator_GetLayoutSets environment function. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Navigator_ChangeNavigatorItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorItem ( API_NavigatorItem navigatorItem)

Modifies the given Project Navigator item.

Parameters
navigatorItem[in] The navigator item identified with its guid.
Returns
  • APIERR_BADPARS - The specified navigator item doesn't exist neither in Public View Map nor in My View Map (TeamWork mode).
  • APIERR_NOTMINE - You have no permission to change the item.
  • NoError - The function has completed with success.
Remarks
Use this function to change a Project Navigator item's name or ID. Only View Map items are modifiable. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
BNZeroMemory (&navItem, sizeof(API_NavigatorItem));
navItem.mapId = API_PublicViewMap; //for performance
if (ACAPI_Navigator (APINavigator_GetNavigatorItemID, guid, &navItem)== NoError) {
//name
if (navItem.customName) {
navItem.customName = false;
} else {
navItem.customName = true;
GS::UCopy (L("Name from API"), navItem.uName);
}
//uiId
if (navItem.customUiId) {
navItem.customUiId = false;
} else {
navItem.customUiId = true;
CHCopyC ("ID from API", navItem.uiId);
}
err = ACAPI_Navigator (APINavigator_ChangeNavigatorItemID, &navItem);
}
Represents a Project Navigator item.
Definition: APIdefs_Navigator.h:193
GS::uchar_t uName[API_UniLongNameLen]
The name of the navigator item.
Definition: APIdefs_Navigator.h:197
bool customUiId
Custom ID of the item (relevant only in the View Map and Layout Map).
Definition: APIdefs_Navigator.h:267
char uiId[128]
The ID of the navigator item.
Definition: APIdefs_Navigator.h:207
bool customName
Custom name of the item (relevant only in the View Map and Layout Map).
Definition: APIdefs_Navigator.h:262
API_NavigatorMapID mapId
The Project Navigator map wich contains this item.
Definition: APIdefs_Navigator.h:242

◆ ACAPI_Navigator_ChangeNavigatorView()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorView ( API_NavigatorItem navigatorItem,
API_NavigatorView navigatorView 
)

Sets the given Project Navigator item and its view settings.

Parameters
navigatorItem[in] The navigator item identified with its guid.
navigatorView[in] New view settings of the specified item (can be nullptr).
Returns
  • APIERR_BADPARS - The specified navigator item doesn't exist neither in Public View Map nor in My View Map (TeamWork mode).
  • APIERR_NOTMINE - You have no permission to change the item.
  • NoError - The function has completed with success.
Remarks
Use this function to change a Project Navigator item's name or ID and optionally its view settings. Only View Map items are modifiable. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
BNZeroMemory (&navItem, sizeof(API_NavigatorItem));
navItem.mapId = API_PublicViewMap; //for performance
if (ACAPI_Navigator (APINavigator_GetNavigatorItemID, guid, &navItem)== NoError) {
BNZeroMemory (&navView, sizeof(API_NavigatorView));
if (ACAPI_Navigator ( APINavigator_GetNavigatorViewID, &navItem, &navView) == NoError) {
if (navView.layerStats != nullptr)
BMhKill ((GSHandle*) &(navView.layerStats));
if (navView.modelViewOpt != nullptr)
BMKillPtr ((GSPtr*) &(navView.modelViewOpt));
if (navView.dimPrefs != nullptr)
BMKillPtr ((GSPtr*) &(navView.dimPrefs));
//name
if (navItem.customName) {
navItem.customName = false;
} else {
navItem.customName = true;
GS::UCopy (L("Name from API"), navItem.uName);
}
//uiId
if (navItem.customUiId) {
navItem.customUiId = false;
} else {
navItem.customUiId = true;
CHCopyC ("ID from API", navItem.uiId);
}
// settings
// layer combination
short attributeCount, i;
API_Attribute attribute;
err = ACAPI_Attribute_GetNum (API_LayerCombID, &attributeCount);
if (err == NoError) {
BNZeroMemory (&attribute, sizeof (API_Attribute));
attribute.header.typeID = API_LayerCombID;
for (i = attributeCount; i > 0; --i) {
attribute.header.index = i;
err = ACAPI_Attribute_Get (&attribute);
if (err == NoError) {
CHTruncate (attribute.header.name, navView.layerCombination, sizeof (navView.layerCombination));
break;
}
}
}
// model view options
err = ACAPI_Attribute_GetNum (API_ModelViewOptionsID, &attributeCount);
if (err == NoError) {
BNZeroMemory (&attribute, sizeof (API_Attribute));
attribute.header.typeID = API_ModelViewOptionsID;
for (i = attributeCount; i > 0; --i) {
attribute.header.index = i;
err = ACAPI_Attribute_Get (&attribute);
if (err == NoError) {
CHTruncate (attribute.header.name, navView.modelViewOptName, sizeof (navView.modelViewOptName));
break;
}
}
}
// dimension styles
err = ACAPI_Attribute_GetNum (API_DimStandID, &attributeCount);
if (err == NoError) {
BNZeroMemory (&attribute, sizeof (API_Attribute));
attribute.header.typeID = API_DimStandID;
for (i = attributeCount; i > 0; --i) {
attribute.header.index = i;
err = ACAPI_Attribute_Get (&attribute);
if (err == NoError) {
CHTruncate (attribute.header.name, navView.dimName, sizeof (navView.dimName));
break;
}
}
}
// scale
navView.drawingScale = 123;
err = ACAPI_Navigator (APINavigator_ChangeNavigatorViewID, &navItem, &navView);
}
}
GSErrCode __ACENV_CALL ACAPI_Attribute_Get(API_Attribute *attribute)
Retrieves an attribute from the database.
GSErrCode __ACENV_CALL ACAPI_Attribute_GetNum(API_AttrTypeID typeID, UInt32 &count)
Returns the number of instances of a given type of attribute.
API_AttrTypeID typeID
Type of the attribute; this identifies the attribute along with the index field. Refer to the API_Att...
Definition: APIdefs_Attributes.h:83
API_AttributeIndex index
The attribute index is the current database index of the given attribute. References to any attribute...
Definition: APIdefs_Attributes.h:90
char name[API_AttrNameLen]
The name of the attribute as UTF-8 encoded C string, which appears in the appropriate dialogs.
Definition: APIdefs_Attributes.h:104
Representation of a Navigator view item.
Definition: APIdefs_Navigator.h:283
char dimName[API_LongNameLen]
Dimension style attribute name. Valid only if the saveDim field is true.
Definition: APIdefs_Navigator.h:322
char layerCombination[API_AttrNameLen]
Layer combination name of the view. Valid only if the saveLaySet field is true.
Definition: APIdefs_Navigator.h:308
API_DimensionPrefs * dimPrefs
Dimensioning settings stored for this view (only if custom). Valid only if the saveDim field is true....
Definition: APIdefs_Navigator.h:327
GS::HashTable< API_AttributeIndex, API_LayerStat > * layerStats
Handle to a set of layer status stored for the view. Valid only if the saveLaySet field is true and l...
Definition: APIdefs_Navigator.h:313
char modelViewOptName[API_LongNameLen]
The name of the model view options as UTF-8 string.
Definition: APIdefs_Navigator.h:293
API_ModelViewOptions * modelViewOpt
Model View option stored for this view, if custom. Valid only if the saveDispOpt field is true....
Definition: APIdefs_Navigator.h:298
Int32 drawingScale
The drawing scale associated with the view. Valid only if the saveDScale field is true.
Definition: APIdefs_Navigator.h:318
Describes the different attributes.
Definition: APIdefs_Attributes.h:1489
API_Attr_Head header
A common header for all the attribute types. It contains information which applies to all the attribu...
Definition: APIdefs_Attributes.h:1494

◆ ACAPI_Navigator_ChangeNavigatorVPItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeNavigatorVPItem ( API_NavigatorAddOnViewPointData viewPointData)

Changes an existing Navigator viewpoint root, group or leaf node in the Project Map.

Parameters
viewPointData[in] Details of the viewpoint root, group or leaf node to be modified. The guid member designates which item to modify. The other members should hold the new values.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - viewPointData was nullptr.
  • APIERR_BADID - viewPointData.guid designetes an object which does not exist, or it is not a Navigator viewpoint root, group or leaf node of the current AddOn.
  • APIERR_NOACCESSRIGHT - The function was called in teamwork mode, and a root or group was to be modified.
  • APIERR_NOTMINE - In teamwork mode, the current user has not reserved the viewpoint root, group or leaf node designated by viewPointData.guid.
Remarks
viewPointData.parentGuid is ignored, i.e. the hierarchy cannot be changed with this function. viewPointData.itemType is ignored, i.e. the type of the object to change is determined by viewPointData.guid. viewPointData.viewSettingsFlags is ignored, if viewPointData.parentGuid designates a root or a group. Note: In teamwork mode you cannot create, change or delete viewpoint roots or groups.

◆ ACAPI_Navigator_ChangeStructureDisplay()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeStructureDisplay ( API_UIStructureDisplay uiStructureDisplay)

Changes the partial structure display options for the current database.

Parameters
uiStructureDisplay[in] The new parameters of the structure display.
Returns
  • NoError - The function completed with success.
  • APIERR_NOPLAN - No plan window.
  • APIERR_BADPARS - The uiStructureDisplay parameter is nullptr
Remarks
You can use this function to change the partial structure display settings. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Navigator_ChangeViewOptions()

GSErrCode __ACENV_CALL ACAPI_Navigator_ChangeViewOptions ( API_ViewOptions viewOptions,
short *  modelViewOptionAttributeIndex = nullptr 
)

Changes the actual model view options.

Parameters
viewOptions[in] the settings of the 'Model View Options' dialog, and the View/On-Screen View Options menu.
modelViewOptionAttributeIndex[in] Optional parameter; if not nullptr, then switch to the model view options attribute identified by this index.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - viewOptions is nullptr.
  • APIERR_NOPLAN - There is no plan window currently opened.
  • APIERR_BADINDEX - attrIndex is invalid.
Remarks
This function is used to change the on-screen and model view options. The first part of the passed structure corresponds to the parameters in the 'Model View Options' dialog; the other fields to the elements of the View/On-Screen View Options submenu. For more information see the API_ViewOptions structure. The actual settings can be retrieved with the ACAPI_Navigator_GetViewOptions environment function. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Navigator_CloneProjectMapItemToViewMap()

GSErrCode __ACENV_CALL ACAPI_Navigator_CloneProjectMapItemToViewMap ( const API_Guid sourceItemId,
const API_Guid parentItemId,
API_Guid createdItemId 
)

Clones a Navigator item from the project map to view map.

Parameters
sourceItemId[in] Navigator item to be cloned.
parentItemId[in] Parent navigator item of the cloned navigator item.
createdItemId[out] Cloned navigator item.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - sourceItemId or parentItemId is nullptr or invalid.
  • APIERR_GENERAL - General internal error.
Remarks
This function is used to clone a navigator item from the project map to view map by specifying the navigator item to be cloned and the parent in the view map. The properties of the cloned view can be changed with the ACAPI_Navigator_ChangeNavigatorView navigator function.

◆ ACAPI_Navigator_CreateLayout()

GSErrCode __ACENV_CALL ACAPI_Navigator_CreateLayout ( API_LayoutInfo layoutInfo,
API_DatabaseUnId databaseUnId,
API_Guid parent = nullptr 
)

Creates a new layout.

Parameters
layoutInfo[in] properties of the layout
databaseUnId[in] Database of the master layout
parent[in] Optional parameter; Parent navigator item to insert below.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - layoutInfo or databaseUnId is nullptr or invalid
  • APIERR_NOPLAN - Current windows is not plan type
  • APIERR_REFUSEDCMD - This function cannot be called from an opened undo session
  • APIERR_GENERAL - General internal error
Remarks
This function is used to create a new layout by specifying the master layout and the parent in the layout tree. The properties of the layout can be changed with the ACAPI_Navigator_ChangeLayoutSets environment function.

◆ ACAPI_Navigator_CreateNavigatorVPItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_CreateNavigatorVPItem ( API_NavigatorAddOnViewPointData viewPointData)

Creates a new Navigator viewpoint root, group or leaf node in the Project Map.

Parameters
viewPointData[in/out] Details of the viewpoint root, group or leaf node to be created. The guid member will be filled out on return.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - viewPointData was nullptr. viewPointData.itemType was API_NavigatorAddOnViewPointUndefinedID.
  • APIERR_BADID - viewPointData.guid is already used, i.e. an object already exists with the same GUID. Note: if viewPointData.guid was set to APINULLGuid, a GUID is generated for the Navigator root group or group to be created, and this error can never come. viewPointData.parentGuid does not designate an already existing viewpoint group.
  • APIERR_NOACCESSRIGHT - The function was called in teamwork mode, and a root or group was to be created.
Remarks
Creating a root group: Set viewPointData.itemType to API_NavigatorAddOnViewPointRootID. When creating a root group, viewPointData.parentGuid and viewPointData.viewSettingsFlags is ignored. If viewPointData.guid was provided on input, the function creates a root group with the given GUID. If an object with the same GUID already exists, the function returns APIERR_BADID. Creating a group Set viewPointData.itemType to API_NavigatorAddOnViewPointGroupID. When creating a group, viewPointData.viewSettingsFlags is ignored. If viewPointData.guid was provided on input, the function creates a group with the given GUID. If an object with the same GUID already exists, the function returns APIERR_BADID. Creating a leaf node Set viewPointData.itemType to API_NavigatorAddOnViewPointNodeID. viewPointData.guid is ignored. A leaf node is always created with an internally generated GUID. Note: In teamwork mode you cannot create, change or delete viewpoint roots or groups.
Example
This example creates a root group, a group and a leaf node, and then verifies, that the created leaf node has the expected content.

◆ ACAPI_Navigator_CreateSubSet()

GSErrCode __ACENV_CALL ACAPI_Navigator_CreateSubSet ( const API_SubSet subSet,
const API_Guid parentGuid = nullptr 
)

Creates the Subset in the Layout Book.

Parameters
subSetThe Subset.
parentGuidThe guid of parent node in the Navigator's Layout Map
Returns
  • NoError - The function has completed with success.
  • APIERR_BADID - parentGuid is nullptr
  • APIERR_MEMFULL - Not enough memory to complete the operation.
Remarks
You can create subsets in the Layout Book with this function. You are able to get the default SubSet Settings via ACAPI_Navigator_GetSubSetDefault database function. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Navigator_DeleteNavigatorView()

GSErrCode __ACENV_CALL ACAPI_Navigator_DeleteNavigatorView ( const API_Guid viewGuid,
const bool *  silentMode 
)

Deletes the given navigator view.

Parameters
viewGuidThe unique identifier of the view.
silentModeThis parameter is used for turn on/off the warning messages comes from Archicad during deleting a view.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - You will encounter with this return value, if something was wrong with the parameters.
Remarks
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
This is an example for view deletion, based on the Navigator_Test test addon.

◆ ACAPI_Navigator_DeleteNavigatorVPItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_DeleteNavigatorVPItem ( const API_Guid guid)

Deletes a Navigator viewpoint root, group or leaf node from the Project Map.

Parameters
guid[in] GUID of the viewpoint root, group or leaf node to delete.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - guid was nullptr.
  • APIERR_BADID - guid designetes an object which does not exist, or it is not a Navigator viewpoint root, group or leaf node of the current AddOn.
  • APIERR_NOACCESSRIGHT - The function was called in teamwork mode, and a root or group was to be deleted.
  • APIERR_NOTMINE - In teamwork mode, the current user has not reserved the viewpoint root, group or leaf node designated by guid.
Remarks
If a root or group is deleted, all descendants are also deleted. Note: In teamwork mode you cannot create, change or delete viewpoint roots or groups.

◆ ACAPI_Navigator_DimStand_Get()

GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_Get ( API_DimensionStandardsType dimStand)

Get a dimension preference by index or name.

Since
Archicad 27
Parameters
dimStand[out]
Returns
  • NoError
  • APIERR_BADINDEX
  • APIERR_BADNAME

◆ ACAPI_Navigator_DimStand_GetNum()

GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_GetNum ( UInt32 &  count)

Get the number of dimension preferences.

Since
Archicad 27
Parameters
count[out] the number of dimension preferences
Returns
  • NoError

◆ ACAPI_Navigator_DimStand_Search()

GSErrCode __ACENV_CALL ACAPI_Navigator_DimStand_Search ( API_DimensionStandards_Head dimStandHead)

Search a dimension preference by name or index.

Since
Archicad 27
Parameters
dimStandHead[in/out] the dimension preferences to look up
Returns
  • NoError
  • APIERR_BADINDEX
  • APIERR_BADNAME

◆ ACAPI_Navigator_GetCurrLayerComb()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetCurrLayerComb ( API_AttributeIndex layerCombIndex)

Retrieves the index of the current layer combination.

Parameters
layerCombIndex[out] index of the layer combination currently in effect
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - layerCombInd is nullptr
Remarks
Use this function to retrieve the index of the layer combination currently set. If the current state of the layers does not match any layer combinations, the function returns 0 in the layerCombInd parameter. You can set layers according to a given layer combination with the ACAPI_Navigator_ChangeCurrLayerComb environment function.

◆ ACAPI_Navigator_GetLayoutBook()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetLayoutBook ( API_LayoutBook book)

Retrieves the Book Settings.

Parameters
bookThe Book settings.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - book is nullptr
Remarks
This function retrieves the Book settings.

◆ ACAPI_Navigator_GetLayoutSets()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetLayoutSets ( API_LayoutInfo layoutInfo,
API_DatabaseUnId databaseUnId = nullptr,
const ULong *  actualPageIndex = nullptr 
)

Returns the settings of a layout.

Parameters
layoutInfo[out] properties of the layout
databaseUnId[in] Optional parameter; return the layout information for this database. If nullptr, then the current layout is used.
actualPageIndex[in] Optional parameter; return the layout information for this page.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - layoutInfo is nullptr
  • APIERR_BADDATABASE - The current database is not layout type
Remarks
This function is used to retrieve the current or the given layout's parameters such as name, size and margin values. The properties of the layout can be changed with the ACAPI_Navigator_ChangeLayoutSets environment function.

◆ ACAPI_Navigator_GetNavigatorChildNum()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorChildNum ( API_NavigatorItem parent,
Int32 *  num 
)

Retrieves the number of children of a navigator item.

Parameters
parent[in] The requested navigator item identified with GUID (you should set mapId for performance).
num[out] The number of children of the navigator item
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The parent or the num parameter is nullptr, or contains invalid data.
  • APIERR_GENERAL - No open project
Remarks
This function retrieves the number of child items of a given item of the Project Navigator.
Example
See the example of APINavigator_SearchNavigatorItemID
.

◆ ACAPI_Navigator_GetNavigatorChildrenItems()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorChildrenItems ( API_NavigatorItem item,
GS::Array< API_NavigatorItem > *  items 
)

Retrieves the child items of a navigator item.

Parameters
item[in] The requested navigator item identified with GUID (optional you should set mapId for performance).
items[out] Data of the child navigator items (optional parameter)
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The item parameter is nullptr or contains invalid data, or both the items and itemsArray parameters are nullptr.
  • APIERR_GENERAL - No open project.
Remarks
This function is used to get the child items of a given item of the Project Navigator. Do not forget to dispose the items handle if not needed any more.
Example
Refer to the Navigator_Test
example project of the API Development Kit.

◆ ACAPI_Navigator_GetNavigatorItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorItem ( const API_Guid guid,
API_NavigatorItem navigatorItem 
)

Retrieves a navigator item.

Parameters
guid[in] The GUID of the navigator item
navigatorItem[in/out] Data of the navigator item (you should set mapId for performance).
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The guid or the navigatorItem parameter is nullptr, or contains invalid data.
  • APIERR_GENERAL - No open project.
Remarks
This function is used to get an item of the Project Navigator.
Example
Refer to the Navigator_Test
example project of the API Development Kit.

◆ ACAPI_Navigator_GetNavigatorParentItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorParentItem ( const API_Guid guid,
API_NavigatorItem parent 
)

Retrieves the parent item of a navigator item.

Parameters
guid[in] The GUID of the navigator item
parent[in/out] The parent item of the navigator item (you should set mapId for performance).
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The guid or the parent parameter is nullptr, or contains invalid data.
  • APIERR_GENERAL - No open project.
Remarks
This function is used to get the parent node of a given item of the Project Navigator.
Example
See the example of APINavigator_SearchNavigatorItemID
.

◆ ACAPI_Navigator_GetNavigatorSet()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorSet ( API_NavigatorSet navigatorSet,
Int32 *  index = nullptr 
)

Retrieves information of a Project Navigator Map or Publisher Set.

Parameters
navigatorSet[in/out] Data of the Project Navigator's Map. Identified with mapId.
index[in] Index of the required set. Used only for Publisher Sets.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The navigatorSet or the index parameter is nullptr.
  • APIERR_BADINDEX - The index parameter contains invalid data.
  • APIERR_GENERAL - No open project.
Remarks
This function is used to retrieve the name and GUID parameters of a given Project Navigator Map.
Example
//navigator maps
for (Int32 mapId = API_ProjectMap; mapId < API_PublisherSets; mapId++) {
BNZeroMemory (&set, sizeof (API_NavigatorSet));
set.mapId = (API_NavigatorMapID) mapId;
err = ACAPI_Navigator (APINavigator_GetNavigatorSetID, &set, nullptr);
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
//publisher sets
Int32 nSet = 0;
GSErrCode err = ACAPI_Navigator (APINavigator_GetNavigatorSetNumID, &nSet, nullptr);
if (err == NoError) {
for (Int32 i = 0; i < nSet && err == NoError; i++) {
BNZeroMemory (&set, sizeof (API_NavigatorSet));
set.mapId = API_PublisherSets;
err = ACAPI_Navigator (APINavigator_GetNavigatorSetID, &set, &i);
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
}
void __ACENV_CALL ACAPI_WriteReport(const GS::UniString &format, bool withDial,...)
Writes a report string into the Report Windowot into a custom alert window.
API_NavigatorMapID
Enumeration of Project Navigator maps.
Definition: APIdefs_Navigator.h:81
Parameters of a project Navigator Set.
Definition: APIdefs_Navigator.h:136
char name[128]
The name of navigator set.
Definition: APIdefs_Navigator.h:141
API_NavigatorMapID mapId
The navigator set belongs to this map.
Definition: APIdefs_Navigator.h:156

◆ ACAPI_Navigator_GetNavigatorSetNum()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorSetNum ( Int32 *  setNum)

Retrieves the number of Publisher Sets.

Parameters
setNum[out] Number of Publisher Sets.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - setNum is nullptr.
  • APIERR_GENERAL - No open project
Remarks
This function is used to retrieve the number of Publisher Sets.
Example
See the example of APINavigator_GetNavigatorSetID
function.

◆ ACAPI_Navigator_GetNavigatorView()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorView ( API_NavigatorItem navigatorItem,
API_NavigatorView navigatorView 
)

Retrives a navigator view.

Parameters
navigatorItem[in] The requested navigator item identified with GUID (you should set mapId for performance).
navigatorView[out] Data of the navigator item
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The navigatorItem or the navigatorView parameter is nullptr, or contains invalid data.
  • APIERR_GENERAL - No open project.
Remarks
This function is used to get the view settings of an item of the Project Navigator.
Example
See the example of APINavigator_SearchNavigatorItemID
.

◆ ACAPI_Navigator_GetNavigatorVPItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPItem ( API_NavigatorAddOnViewPointData viewPointData)

Gets information about an existing Navigator viewpoint root, group or leaf node in the Project Map.

Parameters
viewPointData[in/out] The guid member should be provided before call. The result of the query will be filled in the other members on return.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - viewPointData was nullptr.
  • APIERR_BADID - viewPointData.guid designetes an object which does not exist, or it is not a Navigator viewpoint root, group or leaf node of the current AddOn.
Remarks
viewPointData.viewSettingsFlags is set to API_NavgatorViewSettingsNoAttributeID, if viewPointData.guid designates a root or a group.

◆ ACAPI_Navigator_GetNavigatorVPItemChildren()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPItemChildren ( const API_Guid guid,
GS::Array< API_Guid > *  childrenGuids 
)

Gets the list of child viewpoint groups/nodes of a Navigator viewpoint root or group.

Parameters
guid[in] The GUID of the root/group of which the children are to be queried.
childrenGuids[out] The GUIDs of the children.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - guid was nullptr. childrenGuids was nullptr.
  • APIERR_BADID - guid does not designate an existing Navigator viewpoint root or group.
Example
See in the documentation of APINavigator_GetNavigatorVPRootGroupsID
.

◆ ACAPI_Navigator_GetNavigatorVPRootGroups()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetNavigatorVPRootGroups ( GS::Array< API_Guid > *  rootGuids)

Gets the list of Navigator viewpoint roots.

Parameters
rootGuids[out] The GUIDs of the current AddOn's Navigator viewpoint roots.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - rootGuids was nullptr.
Example
This example prints all Navigator viewpoint roots, groups and leaf nodes to the debug output.

◆ ACAPI_Navigator_GetStructureDisplay()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetStructureDisplay ( API_UIStructureDisplay uiStructureDisplay)

Changes the partial structure display options for the current database.

Parameters
uiStructureDisplay[out] The settings of the structure display in the current database.
Returns
  • NoError - The function completed with success.
  • APIERR_NOPLAN - No plan window.
  • APIERR_BADDATABASE - The current database doesn't have structure display settings.
  • APIERR_BADPARS - The uiStructureDisplay parameter is nullptr
Remarks
You can use this function to get the partial structure display settings for the current database.

◆ ACAPI_Navigator_GetSubSet()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetSubSet ( const API_Guid guid,
API_SubSet subSet 
)

Retrieves the Subset settings of the given Layout Subset.

Parameters
guidThe guid of the Layout Subset.
subSetThe Subset.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - subSet is nullptr
Remarks
This function retrieves the subset settings of a Layout Subset given by API_Guid. You can create subsets via ACAPI_Navigator_CreateSubSet function.

◆ ACAPI_Navigator_GetSubSetDefault()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetSubSetDefault ( API_SubSet subSet)

Retrieves the default Subset settings of the Layout Book.

Parameters
subSetThe default Subset.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - subSet is nullptr
Remarks
This function retrieves the default subset settings of the Layout Book. You can create subsets via ACAPI_Navigator_CreateSubSet function.

◆ ACAPI_Navigator_GetViewOptions()

GSErrCode __ACENV_CALL ACAPI_Navigator_GetViewOptions ( API_ViewOptions viewOptions,
short *  attrIndex = nullptr 
)

Returns the actual view display options.

Parameters
viewOptions[out] actual settings of the 'Model View Options' dialog, and the View/On-Screen View Options menu.
attrIndex[out] Optional parameter; the index of the current model view options combination.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - viewOptions is nullptr
  • APIERR_NOPLAN - There is no plan window currently opened
Remarks
This function is used to retrieve the actual model and on-screen view options. The returned structure corresponds to the parameters can be set in the 'Model View Options' dialog, and in the View/On-Screen View Options submenu. For more information see the API_ViewOptions structure. The settings can be changed with the ACAPI_Navigator_ChangeViewOptions environment function.

◆ ACAPI_Navigator_ModelViewOptions_Get()

GSErrCode __ACENV_CALL ACAPI_Navigator_ModelViewOptions_Get ( API_ModelViewOptionsType modelViewOpt)

Get an API_ModelViewOptionsType by index.

Since
Archicad 27
Parameters
modelViewOpt[out]
Returns
  • NoError
  • APIERR_BADINDEX

◆ ACAPI_Navigator_ModelViewOptions_GetNum()

void __ACENV_CALL ACAPI_Navigator_ModelViewOptions_GetNum ( UInt32 &  count)

Get the number of API_ModelViewOptions.

Since
Archicad 27
Parameters
count[out] the number of MVO-s
Returns
  • NoError

◆ ACAPI_Navigator_ModelViewOptions_Search()

GSErrCode __ACENV_CALL ACAPI_Navigator_ModelViewOptions_Search ( API_ModelViewOptions_Head mvoHead)

Search an API_ModelViewOptions_Head by name or index.

Since
Archicad 27
Parameters
mvoHead[in/out] the API_ModelViewOptions_Head to look up
Returns
  • NoError
  • APIERR_BADINDEX
  • APIERR_BADNAME

◆ ACAPI_Navigator_NewNavigatorView()

GSErrCode __ACENV_CALL ACAPI_Navigator_NewNavigatorView ( API_NavigatorItem navigatorItem,
API_NavigatorView navigatorView,
const GS::Guid *  parent = nullptr,
const GS::Guid *  previousSibling = nullptr 
)

Creates a new Navigator View.

Parameters
navigatorItem[in/out] The item used for creating the view; its guid member will be filled on output.
navigatorView[out] The created view (unless the navigator item's type is API_FolderNavItem).
parentThese parameters are used, when one wants to create a new folder item on the view map, and in this case the first guid is the guid of the node whereunder the new navitem will be placed (the "parent").
previousSiblingThese parameters are used, when one wants to create a new folder item on the view map, and in this case the navigatorView parameter can be nullptr. If you create an other type of element, then this parameter can be nullptr.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - You will encounter with this return value, if something was wrong with the parameters, for example the item was nullptr, orin the parentAndChild array, the first guid is not the guid of the second's father.
Remarks
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
This is an example for folder item creation, based on the Navigator_Test test addon.

◆ ACAPI_Navigator_RegisterCallbackInterface()

GSErrCode __ACENV_CALL ACAPI_Navigator_RegisterCallbackInterface ( INavigatorCallbackInterface callBackInterface)

Registers an object with virtual functions that is implemented by the AddOn, and on certain events called by Archicad.

Parameters
callBackInterface[in] Pointer to the callback interface object to register.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - callBackInterface was nullptr.
Remarks
The object pointed to by callBackInterface must be derived from INavigatorCallbackInterface. Its lifetime must be managed by the AddOn.

◆ ACAPI_Navigator_SearchNavigatorItem()

GSErrCode __ACENV_CALL ACAPI_Navigator_SearchNavigatorItem ( API_NavigatorItem item,
GS::Array< API_NavigatorItem > *  items 
)

Searches the navigator items of the requested database.

Parameters
item[in] The identification parameters of the requested Viewpoint/database. The itemType parameter is compulsory.
items[out] The navigator items matching the specified Viewpoint/database (optional parameter)
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The item parameter is nullptr or contains invalid data, or both the items and itemsArray parameters are nullptr.
  • APIERR_GENERAL - No open project.
Remarks
This function retrieves the items of the Project Navigator which refer to the specified Viewpoint/database. Do not forget to dispose the items handle if it is not needed any more.
Example
GSErrCode err = NoError;
GS::Array<API_NavigatorItem> items;
item.itemType = API_StoryNavItem;
item.mapId = API_PublicViewMap;
err = ACAPI_Navigator (APINavigator_SearchNavigatorItemID, &item, nullptr, &items);
if (err != NoError)
return;
char str[256];
Int32 num;
ACAPI_WriteReport ("Stories of View Map:", false);
for (const API_NavigatorItem& navItem : items) {
sprintf (str, "%s", GS::UniString (navItem.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
BNZeroMemory (&parent, sizeof (API_NavigatorItem));
parent.mapId = API_PublicViewMap;
err = ACAPI_Navigator (APINavigator_GetNavigatorParentItemID, navItem.guid, &parent, nullptr);
sprintf (str, " - parent name: %s", GS::UniString (parent.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
err = ACAPI_Navigator (APINavigator_GetNavigatorChildNumID, &parent, &num, nullptr);
sprintf (str, " - number of children of the parent: %d", num);
ACAPI_WriteReport (str, false);
BNZeroMemory (&view, sizeof (API_NavigatorView));
err = ACAPI_Navigator (APINavigator_GetNavigatorViewID, &navItem, &view, nullptr);
if (view.saveLaySet) {
if (view.layerCombination[0] != 0)
sprintf (str, " - Layer combination: %s", view.layerCombination);
else
sprintf (str, " - Layers individual");
} else {
sprintf (str, " - none layers");
}
BMhKill ((GSHandle*) &view.layerStats);
ACAPI_WriteReport (str, false);
}
API_NavigatorItemTypeID itemType
Type of the item.
Definition: APIdefs_Navigator.h:247
bool saveLaySet
Layer settings are stored in the view. If false, the layerCombinationand the layerStats fields do not...
Definition: APIdefs_Navigator.h:342

◆ ACAPI_Navigator_SetMasterLayoutOnLayout()

GSErrCode __ACENV_CALL ACAPI_Navigator_SetMasterLayoutOnLayout ( const API_DatabaseUnId databaseUnId = nullptr)

Sets the layout context of current database for drawing.

Parameters
databaseUnId[in] The database identifier of the layout context.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - databaseUnId is nullptr or a non existing database identifier.
Remarks
This function is used to set the layout context of the current database, when current database is a master layout. Use this function after changed to a master layout of the given layout with ACAPI_Database_ChangeCurrentDatabase. When this function successfully completed, the datas (autotexts, etc.) on master layout will be shown in the context of the given layout.

◆ ACAPI_Navigator_SetNavigatorItemPosition()

GSErrCode __ACENV_CALL ACAPI_Navigator_SetNavigatorItemPosition ( const GS::Guid *  source,
const GS::Guid *  parent,
const GS::Guid *  child 
)

With this function a navigator item can be moved to an other place. It can be used with items on the layout map and on the view maps (in case of teamworking on the public and on the users' own view map as well.

Parameters
sourceThe guid of the item, what you want to replace.
parentThe new parent of the replaced item.
childIf it is nullptr, then the item will be inserted to the first place on the actual level, otherwise the it will be inserted after the child.
Returns
  • NoError - Everything is OK.
  • APIERR_BADPARS - This value can be returned in several cases: the source or the parent parameter is nullptr, or the source or the parent guid was not found in the layout map and neither in the view maps, or the source item cannot be moved to the desired destination.
  • APIERR_NOACCESSRIGHT - In case of teamworking, if the user not owns (locked) the item which (s)he wants to move then the user has no access right...
Remarks
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.