Archicad 29 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 {
  API_LengthTypeID::Meter , API_LengthTypeID::Decimeter , API_LengthTypeID::Centimeter , API_LengthTypeID::Millimeter ,
  API_LengthTypeID::FootFracInch , API_LengthTypeID::FootDecInch , API_LengthTypeID::DecFoot , API_LengthTypeID::FracInch ,
  API_LengthTypeID::DecInch , API_LengthTypeID::KiloMeter , API_LengthTypeID::Yard
}
 Possible values for length unit preferences. More...
 
enum class  API_AreaTypeID {
  API_AreaTypeID::SquareMeter , API_AreaTypeID::SquareKiloMeter , API_AreaTypeID::SquareDeciMeter , API_AreaTypeID::SquareCentimeter ,
  API_AreaTypeID::SquareMillimeter , API_AreaTypeID::SquareFoot , API_AreaTypeID::SquareInch , API_AreaTypeID::SquareYard
}
 Possible values for area unit preferences. More...
 
enum class  API_AngleTypeID {
  API_AngleTypeID::DecimalDegree , API_AngleTypeID::DegreeMinSec , API_AngleTypeID::Grad , API_AngleTypeID::Radian ,
  API_AngleTypeID::Surveyors
}
 Possible values for angle unit preferences. More...
 
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. More...
 
enum  API_NavigatorViewSettingsFlags {
  API_NavigatorViewSettingsNoAttributeID = 0b000000000 , API_NavigatorViewSettingsLayerAttributeID = 0b000000001 , API_NavigatorViewSettingsScaleAttributeID = 0b000000010 , API_NavigatorViewSettingsStructureDisplayAttributeID = 0b000000100 ,
  API_NavigatorViewSettingsPenTableAttributeID = 0b000001000 , API_NavigatorViewSettingsDisplayOptionAttributeID = 0b000010000 , API_NavigatorViewSettingsOverrideCombinationAttributeID = 0b000100000 , API_NavigatorViewSettingsPlanTypeAttributeID = 0b001000000 ,
  API_NavigatorViewSettingsDimensionAttributeID = 0b010000000 , API_NavigatorViewSettingsZoomAttributeID = 0b100000000
}
 Determines which view settings to enable in an API_NavigatorAddOnViewPointData. More...
 
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.
 

Functions

GSErrCode ACAPI_Navigator_GetSubSetDefault (API_SubSet *subSet)
 Retrieves the default Subset settings of the Layout Book.
 
GSErrCode ACAPI_Navigator_CreateSubSet (const API_SubSet *subSet, const API_Guid *parentGuid=nullptr)
 Creates the Subset in the Layout Book.
 
GSErrCode ACAPI_Navigator_GetSubSet (const API_Guid *guid, API_SubSet *subSet)
 Retrieves the Subset settings of the given Layout Subset.
 
GSErrCode ACAPI_Navigator_GetLayoutBook (API_LayoutBook *book)
 Retrieves the Book Settings.
 
GSErrCode ACAPI_Navigator_GetViewOptions (API_ViewOptions *viewOptions, short *attrIndex=nullptr)
 Returns the actual view display options.
 
GSErrCode ACAPI_Navigator_ChangeViewOptions (API_ViewOptions *viewOptions, short *modelViewOptionAttributeIndex=nullptr)
 Changes the actual model view options.
 
GSErrCode ACAPI_Navigator_CreateLayout (API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId, API_Guid *parent=nullptr)
 Creates a new layout.
 
GSErrCode ACAPI_Navigator_GetLayoutSets (API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId=nullptr, const ULong *actualPageIndex=nullptr)
 Returns the settings of a layout.
 
GSErrCode ACAPI_Navigator_ChangeLayoutSets (const API_LayoutInfo *layoutInfo, API_DatabaseUnId *databaseUnId)
 Changes the settings of the current layout in Archicad.
 
GSErrCode ACAPI_Navigator_GetCurrLayerComb (API_AttributeIndex *layerCombIndex)
 Retrieves the index of the current layer combination.
 
GSErrCode ACAPI_Navigator_ChangeCurrLayerComb (API_AttributeIndex *layerCombIndex)
 Activates a layer combination.
 
GSErrCode ACAPI_Navigator_GetStructureDisplay (API_UIStructureDisplay *uiStructureDisplay)
 Changes the partial structure display options for the current database.
 
GSErrCode ACAPI_Navigator_ChangeStructureDisplay (API_UIStructureDisplay *uiStructureDisplay)
 Changes the partial structure display options for the current database.
 
GSErrCode ACAPI_Navigator_SetMasterLayoutOnLayout (const API_DatabaseUnId *databaseUnId=nullptr)
 Sets the layout context of current database for drawing.
 
GSErrCode ACAPI_Navigator_GetNavigatorSetNum (Int32 *setNum)
 Retrieves the number of Publisher Sets.
 
GSErrCode ACAPI_Navigator_GetNavigatorSet (API_NavigatorSet *navigatorSet, Int32 *index=nullptr)
 Retrieves information of a Project Navigator Map or Publisher Set.
 
GSErrCode ACAPI_Navigator_GetNavigatorItem (const API_Guid *guid, API_NavigatorItem *navigatorItem)
 Retrieves a navigator item.
 
GSErrCode ACAPI_Navigator_GetNavigatorParentItem (const API_Guid *guid, API_NavigatorItem *parent)
 Retrieves the parent item of a navigator item.
 
GSErrCode ACAPI_Navigator_GetNavigatorChildNum (API_NavigatorItem *parent, Int32 *num)
 Retrieves the number of children of a navigator item.
 
GSErrCode ACAPI_Navigator_GetNavigatorChildrenItems (API_NavigatorItem *item, GS::Array< API_NavigatorItem > *items)
 Retrieves the child items of a navigator item.
 
GSErrCode ACAPI_Navigator_GetNavigatorView (API_NavigatorItem *navigatorItem, API_NavigatorView *navigatorView)
 Retrives a navigator view.
 
GSErrCode ACAPI_Navigator_SearchNavigatorItem (API_NavigatorItem *item, GS::Array< API_NavigatorItem > *items)
 Searches the navigator items of the requested database.
 
GSErrCode ACAPI_Navigator_ChangeNavigatorView (API_NavigatorItem *navigatorItem, API_NavigatorView *navigatorView)
 Sets the given Project Navigator item and its view settings.
 
GSErrCode 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 ACAPI_Navigator_DeleteNavigatorView (const API_Guid *viewGuid, const bool *silentMode)
 Deletes the given navigator view.
 
GSErrCode ACAPI_Navigator_ChangeNavigatorItem (API_NavigatorItem *navigatorItem)
 Modifies the given Project Navigator item.
 
GSErrCode 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 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 ACAPI_Navigator_CreateNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Creates a new Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode ACAPI_Navigator_DeleteNavigatorVPItem (const API_Guid *guid)
 Deletes a Navigator viewpoint root, group or leaf node from the Project Map.
 
GSErrCode ACAPI_Navigator_ChangeNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Changes an existing Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode ACAPI_Navigator_GetNavigatorVPItem (API_NavigatorAddOnViewPointData *viewPointData)
 Gets information about an existing Navigator viewpoint root, group or leaf node in the Project Map.
 
GSErrCode ACAPI_Navigator_GetNavigatorVPRootGroups (GS::Array< API_Guid > *rootGuids)
 Gets the list of Navigator viewpoint roots.
 
GSErrCode 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 ACAPI_Navigator_RegisterCallbackInterface (INavigatorCallbackInterface *callBackInterface)
 Registers an object with virtual functions that are implemented by the AddOn. These are called by Archicad when certain events happen relating to the navigator items that are registered by the AddOn.
 
void ACAPI_FreeGDLModelViewOptionsPtr (API_GDLModelViewOptions **gdlModelViewOptions)
 Frees the GDL model view options pointer.
 
GSErrCode ACAPI_Navigator_DimStand_Search (API_DimensionStandards_Head *dimStandHead)
 Search a dimension preference by name or index.
 
GSErrCode ACAPI_Navigator_DimStand_GetNum (UInt32 &count)
 Get the number of dimension preferences.
 
GSErrCode ACAPI_Navigator_DimStand_Get (API_DimensionStandardsType &dimStand)
 Get a dimension preference by index or name.
 
GSErrCode ACAPI_Navigator_ModelViewOptions_Search (API_ModelViewOptions_Head *mvoHead)
 Search an API_ModelViewOptions_Head by name or index.
 
void ACAPI_Navigator_ModelViewOptions_GetNum (UInt32 &count)
 Get the number of API_ModelViewOptions.
 
GSErrCode 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_AngleTypeID

enum class API_AngleTypeID
strong

Possible values for angle unit preferences.

Enumerator
DecimalDegree 

decimal degrees

DegreeMinSec 

degrees, minutes, seconds

Grad 

grad

Radian 

radian

Surveyors 

surveyor's unit

◆ API_AreaTypeID

enum class API_AreaTypeID
strong

Possible values for area unit preferences.

Since
Archicad 26
Enumerator
SquareMeter 

square meter

SquareKiloMeter 

square kilometer

SquareDeciMeter 

square decimeter

SquareCentimeter 

square centimeter

SquareMillimeter 

square millimeter

SquareFoot 

square feet

SquareInch 

square inches

SquareYard 

square yard

◆ 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.
Enumerator
API_ZombieAttrID 

Dummy attribute type.

API_FirstAttributeID 

Starting attribute ID.

API_LayerID 

Denotes a layer attribute.

API_LinetypeID 

Denotes a line type attribute.

API_FilltypeID 

Denotes a fill attribute.

API_CompWallID 

Denotes a composite wall attribute.

API_MaterialID 

Denotes a material attribute.

API_LayerCombID 

Denotes a layer combination attribute.

API_ZoneCatID 

Denotes a zone category attribute.

API_ProfileID 

Denotes a custom profile attribute for walls, beams, and columns.

API_PenTableID 

Denotes a named pen table attribute (a collection of 255 pens).

API_MEPSystemID 

Denotes an MEP System attribute.

API_OperationProfileID 

Denotes an Energy Evaluation operation profile.

API_BuildingMaterialID 

Denotes a building material attribute.

API_LastAttributeID 

Ending attribute ID.

◆ API_LengthTypeID

enum class API_LengthTypeID
strong

Possible values for length unit preferences.

Since
Archicad 26
Enumerator
Meter 

meter

Decimeter 

decimeter

Centimeter 

centimeter

Millimeter 

millimeter

FootFracInch 

feet & fractional inches

FootDecInch 

feet & decimal inches

DecFoot 

decimal feet

FracInch 

fractional inches

DecInch 

decimal inches

KiloMeter 

kilometer

Yard 

yard

◆ API_NavigatorAddOnViewPointTypeID

Describes the type of a Navigator AddOn item.

Enumerator
API_NavigatorAddOnViewPointUndefinedID 

Not used. You cannot create a Navigator AddOn viewpoint root, group or leaf node of this type.

API_NavigatorAddOnViewPointRootID 

Represents a Navigator AddOn viewpoint root.

API_NavigatorAddOnViewPointGroupID 

Represents a Navigator AddOn viewpoint group.

API_NavigatorAddOnViewPointNodeID 

Represents a Navigator AddOn viewpoint leaf node.

◆ API_NavigatorItemTypeID

Enumeration of Project Navigator items.

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

Undefined item.

API_ProjectNavItem 

The root item.

API_StoryNavItem 

Story item.

API_SectionNavItem 

Section item.

API_DetailDrawingNavItem 

Detail drawing item.

API_PerspectiveNavItem 

3D perspective item.

API_AxonometryNavItem 

3D axonometry item.

API_ListNavItem 

List item.

API_ScheduleNavItem 

Element schedule item.

API_TocNavItem 

Project Index item.

API_CameraNavItem 

Camera Item.

API_CameraSetNavItem 

Camera Set item.

API_InfoNavItem 

Info item.

API_HelpNavItem 

Help item.

API_LayoutNavItem 

Layout item.

API_MasterLayoutNavItem 

Master Layout item.

API_BookNavItem 

Book item (root of Layout Map).

API_MasterFolderNavItem 

Master Folder item.

API_SubSetNavItem 

Subset item.

API_TextListNavItem 

Text-type listing window.

API_ElevationNavItem 

Elevation item.

API_InteriorElevationNavItem 

Interior Elevation item.

API_WorksheetDrawingNavItem 

Worksheet item.

API_DocumentFrom3DNavItem 

3D Document item.

API_FolderNavItem 

Folder item.

API_DrawingNavItem 

Drawing item.

◆ API_NavigatorViewSettingsFlags

Determines which view settings to enable in an API_NavigatorAddOnViewPointData.

Enumerator
API_NavigatorViewSettingsNoAttributeID 

Disable all view settings types.

API_NavigatorViewSettingsLayerAttributeID 

Enable Layer Combination.

API_NavigatorViewSettingsScaleAttributeID 

Enable Scale.

API_NavigatorViewSettingsStructureDisplayAttributeID 

Enable Partial Structure Display.

API_NavigatorViewSettingsPenTableAttributeID 

Enable Pen Set.

API_NavigatorViewSettingsDisplayOptionAttributeID 

Enable Model View Options.

API_NavigatorViewSettingsOverrideCombinationAttributeID 

Enable Graphic Override Combinations.

API_NavigatorViewSettingsPlanTypeAttributeID 

Enable Renovation Filter.

API_NavigatorViewSettingsDimensionAttributeID 

Enable Dimensions.

API_NavigatorViewSettingsZoomAttributeID 

Enable Zoom.

◆ API_NumberingStyle

Describes the Layout ID styles.

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

Undefined style.

API_NS_abc 

a, b, c,...

API_NS_ABC 

A, B, C,...

API_NS_1 

1, 2, 3,...

API_NS_01 

01, 02, 03,...

API_NS_001 

001, 002, 003,...

API_NS_0001 

0001, 0002, 0003,...

API_NS_noID 

No ID.

Function Documentation

◆ ACAPI_FreeGDLModelViewOptionsPtr()

void ACAPI_FreeGDLModelViewOptionsPtr ( API_GDLModelViewOptions ** gdlModelViewOptions)

Frees the GDL model view options pointer.

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

◆ ACAPI_Navigator_ChangeCurrLayerComb()

GSErrCode 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 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 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
API_NavigatorItem navItem {};
navItem.mapId = API_PublicViewMap; //for performance
if (ACAPI_Navigator_GetNavigatorItem (&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);
}
}

◆ ACAPI_Navigator_ChangeNavigatorView()

GSErrCode 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
if (err != NoError)
return;
for (auto& childItem : items) {
if (childItem.itemType == API_StoryNavItem) {
//get settings
// change settings
// name
if (childItem.customName) {
childItem.customName = false;
} else {
childItem.customName = true;
GS::UCopy (L("Name from API"), childItem.uName);
}
//uiId
if (childItem.customUiId) {
childItem.customUiId = false;
} else {
childItem.customUiId = true;
CHCopyC ("ID from API", childItem.uiId);
}
// settings
// layer combination
GS::Array<API_Attribute> attributes;
if (!attributes.IsEmpty ())
CHTruncate (attributes.GetLast ().header.name, view.layerCombination, sizeof (view.layerCombination));
// model view options
UInt32 mvoCount = 0;
API_ModelViewOptionsType modelViewOption {};
for (UInt32 i = mvoCount; i > 0; --i) {
modelViewOption.head.index = i;
err = ACAPI_Navigator_ModelViewOptions_Get (&modelViewOption);
if (err == NoError) {
CHTruncate (modelViewOption.head.name, view.modelViewOptName, sizeof (view.modelViewOptName));
ACAPI_FreeGDLModelViewOptionsPtr (&modelViewOption.modelViewOpt.gdlOptions);
break;
}
}
// dimension styles
UInt32 dimStandCount = 0;
err = ACAPI_Navigator_DimStand_GetNum (dimStandCount);
if (err != NoError)
break;
for (UInt32 i = dimStandCount; i > 0; --i) {
dimStand.head.index = i;
err = ACAPI_Navigator_DimStand_Get (dimStand);
if (err == NoError) {
CHTruncate (dimStand.head.name, view.dimName, sizeof (view.dimName));
break;
}
}
// scale
view.drawingScale = 123;
// renovation filter
API_NavigatorView oldView {};
err = ACAPI_Navigator_GetNavigatorView (&childItem, &oldView);

◆ ACAPI_Navigator_ChangeNavigatorVPItem()

GSErrCode 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 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 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 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 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 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.
// create a root group
API_NavigatorAddOnViewPointData rootVP; // Do not memset! This is not a POD type.
rootVP.displayName = "My AddOn's Root";
DBVERIFY (ACAPI_Navigator_CreateNavigatorVPItem(&rootVP) == NoError);
// create a group
groupVP.parentGuid = rootVP.guid;
groupVP.displayName = "Group Name";
DBVERIFY (ACAPI_Navigator_CreateNavigatorVPItem(&groupVP) == NoError);
// create a leaf node
nodeVP.parentGuid = groupVP.guid;
nodeVP.displayId = "1";
nodeVP.displayName = "Node Name";
nodeVP.data = BMhAll (13);
strcpy (*nodeVP.data, "Hello World!");
DBVERIFY (ACAPI_Navigator_CreateNavigatorVPItem(&nodeVP) == NoError);
// query
nodeVP2.guid = nodeVP.guid;
DBVERIFY (ACAPI_Navigator_GetNavigatorVPItem(&nodeVP2) == NoError);
DBASSERT (nodeVP2.displayId == nodeVP.displayId);
DBASSERT (nodeVP2.displayName == nodeVP.displayName);
DBASSERT (nodeVP2.itemType == nodeVP.itemType);
DBASSERT (nodeVP2.guid == nodeVP.guid);
DBASSERT (nodeVP2.parentGuid == nodeVP.parentGuid);
DBASSERT (nodeVP2.viewSettingsFlags == nodeVP.viewSettingsFlags);
DBASSERT (CHEqualCStrings (*nodeVP2.data, *nodeVP.data));
// API_NavigatorAddOnViewPointData's destructor will free nodeVP.data and nodeVP2.data

◆ ACAPI_Navigator_CreateSubSet()

GSErrCode 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 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.
static void DeleteView (short dialogID)
{
Int32 selected = DGTreeViewGetSelected (dialogID, NavTreeView, DG_TVI_ROOT);
if (DBERROR (selected == DG_TVI_NONE))
return;
GS::Array<API_Guid> toDeleteItems;
API_Guid guid = NavigatorPaletteTestGlobals::GetInstance ().GetNavigatorItem ((UIndex)DGTreeViewGetItemUserData (dialogID, NavTreeView, selected));
toDeleteItems.Push (guid);
for (;;) {
selected = DGTreeViewGetItem (dialogID, NavTreeView, selected, DG_TVG_NEXTLISTED);
selected = DGTreeViewGetSelected (dialogID, NavTreeView, selected);
if (selected == DG_TVI_NONE)
break;
guid = NavigatorPaletteTestGlobals::GetInstance ().GetNavigatorItem ((UIndex)DGTreeViewGetItemUserData (dialogID, NavTreeView, selected));
toDeleteItems.Push (guid);
}
bool silentMode = true;
for (USize i = 0; i < toDeleteItems.GetSize (); ++i)
ACAPI_Navigator_DeleteNavigatorView (&toDeleteItems[i], &silentMode);
UpdateTree (dialogID);
}

◆ ACAPI_Navigator_DeleteNavigatorVPItem()

GSErrCode 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 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 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 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 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 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 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 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
GSErrCode err = NoError;
GS::Array<API_NavigatorItem> items;
item.mapId = API_PublicViewMap;
if (err != NoError)
return;
char str[256];
Int32 num;
ACAPI_WriteReport ("Stories of View Map:", false);
for (API_NavigatorItem& navItem : items) {
sprintf (str, "%s", GS::UniString (navItem.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
parent = {};
err = ACAPI_Navigator_GetNavigatorParentItem (&navItem.guid, &parent);
sprintf (str, " - parent name: %s", GS::UniString (parent.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
err = ACAPI_Navigator_GetNavigatorChildNum (&parent, &num);
sprintf (str, " - number of children of the parent: %d", num);
ACAPI_WriteReport (str, false);
view = {};
err = ACAPI_Navigator_GetNavigatorView (&navItem, &view);
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);
}

◆ ACAPI_Navigator_GetNavigatorChildrenItems()

GSErrCode 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 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 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
GSErrCode err = NoError;
GS::Array<API_NavigatorItem> items;
item.mapId = API_PublicViewMap;
if (err != NoError)
return;
char str[256];
Int32 num;
ACAPI_WriteReport ("Stories of View Map:", false);
for (API_NavigatorItem& navItem : items) {
sprintf (str, "%s", GS::UniString (navItem.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
parent = {};
err = ACAPI_Navigator_GetNavigatorParentItem (&navItem.guid, &parent);
sprintf (str, " - parent name: %s", GS::UniString (parent.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
err = ACAPI_Navigator_GetNavigatorChildNum (&parent, &num);
sprintf (str, " - number of children of the parent: %d", num);
ACAPI_WriteReport (str, false);
view = {};
err = ACAPI_Navigator_GetNavigatorView (&navItem, &view);
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);
}

◆ ACAPI_Navigator_GetNavigatorSet()

GSErrCode 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++) {
set = {};
set.mapId = (API_NavigatorMapID) mapId;
GSErrCode err = ACAPI_Navigator_GetNavigatorSet (&set);
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
//publisher sets
Int32 nSet = 0;
GSErrCode err = ACAPI_Navigator_GetNavigatorSetNum (&nSet);
if (err == NoError) {
for (Int32 i = 0; i < nSet && err == NoError; i++) {
set = {};
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
}

◆ ACAPI_Navigator_GetNavigatorSetNum()

GSErrCode 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
//navigator maps
for (Int32 mapId = API_ProjectMap; mapId < API_PublisherSets; mapId++) {
set = {};
set.mapId = (API_NavigatorMapID) mapId;
GSErrCode err = ACAPI_Navigator_GetNavigatorSet (&set);
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
//publisher sets
Int32 nSet = 0;
GSErrCode err = ACAPI_Navigator_GetNavigatorSetNum (&nSet);
if (err == NoError) {
for (Int32 i = 0; i < nSet && err == NoError; i++) {
set = {};
if (err == NoError)
ACAPI_WriteReport (set.name, false);
}
}

◆ ACAPI_Navigator_GetNavigatorView()

GSErrCode 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
GSErrCode err = NoError;
GS::Array<API_NavigatorItem> items;
item.mapId = API_PublicViewMap;
if (err != NoError)
return;
char str[256];
Int32 num;
ACAPI_WriteReport ("Stories of View Map:", false);
for (API_NavigatorItem& navItem : items) {
sprintf (str, "%s", GS::UniString (navItem.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
parent = {};
err = ACAPI_Navigator_GetNavigatorParentItem (&navItem.guid, &parent);
sprintf (str, " - parent name: %s", GS::UniString (parent.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
err = ACAPI_Navigator_GetNavigatorChildNum (&parent, &num);
sprintf (str, " - number of children of the parent: %d", num);
ACAPI_WriteReport (str, false);
view = {};
err = ACAPI_Navigator_GetNavigatorView (&navItem, &view);
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);
}

◆ ACAPI_Navigator_GetNavigatorVPItem()

GSErrCode 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 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
enum NextEnumAction {
ProcessSubtree,
SkipSubtree,
BreakEnumeration
};
// breadth-first enumeration
static void EnumerateAllNavigatorAddOnViewPoints (const std::function<NextEnumAction (const API_NavigatorAddOnViewPointData& vp)>& processor)
{
GS::Array<API_Guid> rootGuids;
DBVERIFY (ACAPI_Navigator_GetNavigatorVPRootGroups (&rootGuids) == NoError);
GS::Queue<API_Guid> q;
for (const API_Guid& guid : rootGuids)
q.Push (guid);
while (!q.IsEmpty ()) {
viewPointData.guid = q.Pop ();
DBVERIFY (ACAPI_Navigator_GetNavigatorVPItem (&viewPointData) == NoError);
switch (processor (viewPointData)) {
case ProcessSubtree:
GS::Array<API_Guid> childGuids;
DBVERIFY (ACAPI_Navigator_GetNavigatorVPItemChildren (&viewPointData.guid, &childGuids) == NoError);
for (const API_Guid& guid : childGuids)
q.Push (guid);
}
break;
case SkipSubtree:
// do not process children
break;
case BreakEnumeration:
return;
default:
DBBREAK ();
return;
}
}
}
void PrintAllNavigatorAddOnViewPoints ()
{
EnumerateAllNavigatorAddOnViewPoints ([] (const API_NavigatorAddOnViewPointData& vp) -> NextEnumAction {
DBPrintf (GS::UniString (vp.displayId + " " + vp.displayName + "\n").ToCStr ());
return ProcessSubtree;
});
}

◆ ACAPI_Navigator_GetNavigatorVPRootGroups()

GSErrCode 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.
enum NextEnumAction {
ProcessSubtree,
SkipSubtree,
BreakEnumeration
};
// breadth-first enumeration
static void EnumerateAllNavigatorAddOnViewPoints (const std::function<NextEnumAction (const API_NavigatorAddOnViewPointData& vp)>& processor)
{
GS::Array<API_Guid> rootGuids;
DBVERIFY (ACAPI_Navigator_GetNavigatorVPRootGroups (&rootGuids) == NoError);
GS::Queue<API_Guid> q;
for (const API_Guid& guid : rootGuids)
q.Push (guid);
while (!q.IsEmpty ()) {
viewPointData.guid = q.Pop ();
DBVERIFY (ACAPI_Navigator_GetNavigatorVPItem (&viewPointData) == NoError);
switch (processor (viewPointData)) {
case ProcessSubtree:
GS::Array<API_Guid> childGuids;
DBVERIFY (ACAPI_Navigator_GetNavigatorVPItemChildren (&viewPointData.guid, &childGuids) == NoError);
for (const API_Guid& guid : childGuids)
q.Push (guid);
}
break;
case SkipSubtree:
// do not process children
break;
case BreakEnumeration:
return;
default:
DBBREAK ();
return;
}
}
}
void PrintAllNavigatorAddOnViewPoints ()
{
EnumerateAllNavigatorAddOnViewPoints ([] (const API_NavigatorAddOnViewPointData& vp) -> NextEnumAction {
DBPrintf (GS::UniString (vp.displayId + " " + vp.displayName + "\n").ToCStr ());
return ProcessSubtree;
});
}

◆ ACAPI_Navigator_GetStructureDisplay()

GSErrCode 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 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 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 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 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 ACAPI_Navigator_ModelViewOptions_GetNum ( UInt32 & count)

Get the number of API_ModelViewOptions.

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

◆ ACAPI_Navigator_ModelViewOptions_Search()

GSErrCode 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 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.

◆ ACAPI_Navigator_RegisterCallbackInterface()

GSErrCode ACAPI_Navigator_RegisterCallbackInterface ( INavigatorCallbackInterface * callBackInterface)

Registers an object with virtual functions that are implemented by the AddOn. These are called by Archicad when certain events happen relating to the navigator items that are registered by the AddOn.

Parameters
callBackInterface[in] Pointer to the callback interface object to register.
Returns
  • NoError - The function has been 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 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.mapId = API_PublicViewMap;
if (err != NoError)
return;
char str[256];
Int32 num;
ACAPI_WriteReport ("Stories of View Map:", false);
for (API_NavigatorItem& navItem : items) {
sprintf (str, "%s", GS::UniString (navItem.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
parent = {};
err = ACAPI_Navigator_GetNavigatorParentItem (&navItem.guid, &parent);
sprintf (str, " - parent name: %s", GS::UniString (parent.uName).ToCStr ().Get ());
ACAPI_WriteReport (str, false);
err = ACAPI_Navigator_GetNavigatorChildNum (&parent, &num);
sprintf (str, " - number of children of the parent: %d", num);
ACAPI_WriteReport (str, false);
view = {};
err = ACAPI_Navigator_GetNavigatorView (&navItem, &view);
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);
}

◆ ACAPI_Navigator_SetMasterLayoutOnLayout()

GSErrCode 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 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.