Project¶
Read and change project settings, stories, locations and hotlinks, and manage project files.
Access this group through api.tapir.project.
Commands¶
No commands match. Try another name or clear the filter.
For exceptions shared by Unified API commands, see error handling.
break_hotlink_nodes ¶
break_hotlink_nodes(
hotlink_nodes: list[HotlinkNodeReference],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Breaks hotlink nodes, as the Hotlink Manager's Break Hotlink does: the elements of each node's placed instances stay in the project as ordinary elements, no longer tied to the source file.
Parameters:
-
hotlink_nodes(list[HotlinkNodeReference]) –The hotlink nodes to break, from GetHotlinks or CreateHotlinkNodes. The elements of each node's placed instances stay in the project as ordinary elements, no longer tied to the source file, as the Hotlink Manager's Break Hotlink does. In Teamwork the Hotlink and XRef management has to be reserved first (ReserveHotlinkCacheManagement).
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
calculate_sun_position ¶
calculate_sun_position(
date_time: None | SunDateTimeUpdate = None,
location: None | ProjectLocationUpdate = None,
) -> SunPosition
Calculates the sun position (azimuth and altitude in degrees) for a date and time, at the project location unless another one is given, without changing the project.
Parameters:
-
date_time(None | SunDateTimeUpdate, default:None) –The date and time to calculate the sun position for; the fields left out keep the project's date and time.
-
location(None | ProjectLocationUpdate, default:None) –The location to calculate the sun position at; the fields left out keep the project location.
Returns:
change_hotlink_instances ¶
change_hotlink_instances(
hotlink_instances: list[HotlinkInstanceChange],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Moves, rotates or mirrors placed hotlink instances by changing their transformation. MoveElements and RotateElements do not work on hotlink instances.
Parameters:
-
hotlink_instances(list[HotlinkInstanceChange]) –The placed hotlink instances to change. Every field but elementId is optional; a field that is omitted keeps its current value.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
change_hotlink_nodes ¶
change_hotlink_nodes(
hotlink_nodes: list[HotlinkNodeChange],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Repoints hotlink module nodes at other source files, as the Hotlink Manager's Relink button does. Follow it with UpdateHotlinks to re-read the content.
Parameters:
-
hotlink_nodes(list[HotlinkNodeChange]) –The hotlink nodes to repoint at another source file, as the Hotlink Manager's Relink button does. The placed instances stay where they are. Follow it with UpdateHotlinks on the same nodes to re-read the content from the new file.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
close_project ¶
close_project() -> SuccessfulExecutionResult
Closes the currently opened project. Fails, instead of answering success, when Archicad leaves the project open, as it does with its last open project.
Returns:
convert_unit_values ¶
convert_unit_values(
values: list[UnitValueConversionData],
) -> list[ConvertedUnitValue | ErrorItem]
Formats lengths, areas, volumes and angles (given in meters, square meters, cubic meters and radians) as Archicad shows them with the unit and rounding of the given Project Preference, returning the text, its extra accuracy decimals and the unit. The output is aligned with the input array of values. Available from Archicad 27.
Parameters:
-
values(list[UnitValueConversionData]) –The values to convert.
Returns:
-
list[ConvertedUnitValue | ErrorItem]–The converted values, in the order of the input. A value that cannot be converted is an error item.
create_hotlink_instances ¶
create_hotlink_instances(
hotlink_instances: list[HotlinkInstanceCreation],
) -> list[ElementIdArrayItem | ErrorItem]
Places instances of hotlink module nodes at an origin, rotation and mirroring.
Parameters:
-
hotlink_instances(list[HotlinkInstanceCreation]) –The hotlink instances to place.
Returns:
-
list[ElementIdArrayItem | ErrorItem]–A list of element identifiers or errors.
create_hotlink_nodes ¶
create_hotlink_nodes(
hotlink_nodes: list[HotlinkNode],
) -> list[ErrorItem | HotlinkNodeCreated]
Creates hotlink module nodes from source files. A node that already points at the same file is returned instead of duplicated (Archicad 26 and later; 25 cannot see an unplaced node).
Parameters:
-
hotlink_nodes(list[HotlinkNode]) –The hotlink module nodes to create. A node that already points at the same source file (compared case-insensitively) is returned as it is, with existing: true, and the name and story settings asked for are ignored. On Archicad 25 a node that has not been placed yet cannot be found, so a repeated request there creates a second node.
Returns:
-
list[ErrorItem | HotlinkNodeCreated]–One item per requested node, in order: the node guid with its existing flag, or an error.
create_project_info_fields ¶
create_project_info_fields(
project_info_fields: list[ProjectInfoFieldData],
) -> list[CreatedProjectInfoField | ErrorItem]
Creates one or more custom project info fields. From Archicad 30 the Project Info group of each field can be given; without it the field goes to the first group.
Parameters:
-
project_info_fields(list[ProjectInfoFieldData]) –Array of custom project info fields to create.
Returns:
-
list[CreatedProjectInfoField | ErrorItem]–A list of created project info fields or errors, one per requested field.
create_project_info_groups ¶
create_project_info_groups(
project_info_groups: list[ProjectInfoGroupData],
) -> list[ErrorItem | ProjectInfoGroupIdArrayItem]
Creates Project Info groups with the given names, at the end of the group list. Available from Archicad 30.
Parameters:
-
project_info_groups(list[ProjectInfoGroupData]) –The Project Info groups to create, in order. Each is added to the end of the group list.
Returns:
-
list[ErrorItem | ProjectInfoGroupIdArrayItem]–A list of Project Info group identifiers or errors.
delete_hotlink_nodes ¶
delete_hotlink_nodes(
hotlink_nodes: list[HotlinkNodeReference],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Deletes hotlink nodes together with their placed instances, as the Hotlink Manager's Delete does.
Parameters:
-
hotlink_nodes(list[HotlinkNodeReference]) –The hotlink nodes to delete, from GetHotlinks or CreateHotlinkNodes. Each node is removed together with its placed instances and their elements, as the Hotlink Manager's Delete does; use BreakHotlinkNodes instead to keep the elements. In Teamwork the Hotlink and XRef management has to be reserved first (ReserveHotlinkCacheManagement).
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
delete_project_info_fields ¶
delete_project_info_fields(
project_info_ids: None | list[str] = None,
*,
project_info_field_ids: None
| list[ProjectInfoFieldIdArrayItem] = None,
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Deletes one or more custom project info fields, by their autotext keys or, from Archicad 30, by the ids of the fields of the Project Info groups. Hardcoded fields cannot be deleted.
Parameters:
-
project_info_ids(None | list[str], default:None) –List of project info field ids (autotext keys, as GetProjectInfoFields returns them) to delete. Only custom fields can be deleted. On Archicad 30 a key is matched to the field by its name, so it fails when more than one field has the name; delete such a field by its projectInfoFieldId instead.
-
project_info_field_ids(None | list[ProjectInfoFieldIdArrayItem], default:None) –List of fields of the Project Info groups to delete, by the ids GetProjectInfoGroups returns. Available from Archicad 30. Their results follow the results of projectInfoIds.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
delete_project_info_groups ¶
delete_project_info_groups(
project_info_groups: list[ProjectInfoGroupIdArrayItem],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Deletes Project Info groups. A group that contains fixed (built-in) fields cannot be deleted. Available from Archicad 30.
Parameters:
-
project_info_groups(list[ProjectInfoGroupIdArrayItem]) –The Project Info groups to delete. A group that contains fixed (built-in) fields cannot be deleted.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
delete_story ¶
delete_story(
story_index: int,
delete_elements: None | bool = None,
dry_run: None | bool = None,
) -> DeleteStoryResult
Deletes one story. Archicad deletes every element whose home story it is together with it, so a story that is the home story of any element is only deleted with deleteElements: true; otherwise it fails and gives the number of those elements. dryRun reports, without changing anything, whether the story would be deleted and how many elements with it.
Parameters:
-
story_index(int) –The index of the story to delete (see GetStories).
-
delete_elements(None | bool, default:None) –Archicad deletes every element whose home story is the deleted story. Without true here, a story that is the home story of any element is not deleted, and the response says how many elements it has. Default is false.
-
dry_run(None | bool, default:None) –If true, the command makes all the checks of a real run and resolves the same targets, with the same errors, but changes nothing in the project and creates no undo step. The response is that of a real run with "dryRun": true added, and says for each target what the real run would do. Default is false.
Returns:
find_dimension_standard ¶
find_dimension_standard(
name: str,
) -> FindDimensionStandardResult
Finds a dimension standard (Options > Project Preferences > Dimensions) by its name and returns its index, name and guid. Available from Archicad 27.
Parameters:
-
name(str) –The name of the dimension standard, as listed in Options > Project Preferences > Dimensions.
Returns:
get_all_auto_text_keys ¶
get_all_auto_text_keys() -> list[AutoText]
Retrieves every autotext key Archicad knows (not only the property-based ones returned by GetAutoTextKeys) with its current value, resolved without an element context.
Returns:
-
list[AutoText]–
get_auto_intersect ¶
get_auto_intersect() -> bool
Gets whether Auto-Intersection (Options > Auto-Intersection) is on. It changes what the wall and beam creation commands produce: with it on, the new elements are joined at their intersections.
Returns:
-
bool–True if Auto-Intersection is currently on.
get_auto_text_keys ¶
get_auto_text_keys(
element_id: ElementId | None = None,
) -> list[AutoTextKey]
Retrieves the available autotext keys (name and embeddable key): the Project Info, layout, drawing, date and other autotexts Archicad lists, and the property based ones, optionally for a specific element. Embed a key in a Text or Label content by surrounding it with '<' and '>'.
Parameters:
-
element_id(ElementId | None, default:None) –Optional. The element to retrieve context dependent autotext keys for (its own properties, plus the ones common to all element types, e.g. 'Element ID', 'Area'). When omitted, only the property based autotext keys common to all element types are returned. The other autotexts (Project Info, layout, drawing, date, ...) are returned either way.
Returns:
-
list[AutoTextKey]–
get_auto_text_name ¶
get_auto_text_name(
keys: list[str],
) -> list[AutoTextName | ErrorItem]
Retrieves the display names of one or more autotext keys (as returned inside a '<...>' embedded key), with a direct guid lookup for property-based keys instead of enumerating every property definition.
Parameters:
-
keys(list[str]) –Autotext keys as returned by GetAutoTextKeys or GetProjectInfoFields (without the surrounding '<' and '>'), e.g. 'PROPERTY-69A58F6F-DD3B-478D-B5EF-09A16BD0C548' or 'PROJECTNAME'.
Returns:
-
list[AutoTextName | ErrorItem]–One result per input key, in the same order.
get_calculation_units ¶
get_calculation_units() -> GetCalculationUnitsResult
get_coordinate_origins ¶
get_coordinate_origins() -> GetCoordinateOriginsResult
Gets the offset of the virtual coordinate system origin from the world origin, and the user origin of the current database. Use it to tell which origin the coordinates of different sources (elements, views, survey point) are relative to.
Returns:
get_current_view_image ¶
get_current_view_image(
source: None | ViewImageSource = None,
format: None | ViewImageFormat = None,
) -> GetCurrentViewImageResult
Returns what the 3D window, or the PhotoRendering window, shows as a base64 encoded png or jpg image with its size in pixels, without writing a file. Available from Archicad 30.
Parameters:
-
source(None | ViewImageSource, default:None) –Optional, 3DWindow by default.
-
format(None | ViewImageFormat, default:None) –Optional, png by default.
Returns:
get_dimension_standards ¶
get_dimension_standards(
name: None | str = None,
) -> list[DimensionStandard]
Gets the dimension standards of the project (Options > Project Preferences > Dimensions) with their name and the unit, decimals and rounding of each dimension type, optionally only the one with the given name. Read-only. Available from Archicad 27.
Parameters:
-
name(None | str, default:None) –Only the dimension standard with this name is returned (case- sensitive). The list is empty when no standard has this name.
Returns:
-
list[DimensionStandard]–
get_export_tolerance ¶
get_export_tolerance() -> float
Gets the export tolerance: the largest distance allowed between an arc and the straight segments that replace it when curves are segmented for export. Archicad only provides this value while an export is in progress, so outside an export the command returns an error saying so.
Returns:
-
float–The largest distance allowed between an arc and the straight segments that replace it when Archicad segments curves for export, in meters.
get_geo_location ¶
get_geo_location() -> GetGeoLocationResult
Gets the project location details: the project location, and the survey point's position, geo-referencing parameters, visibility and lock state (the lock from Archicad 26).
Returns:
get_hotlink_owners_of_elements ¶
get_hotlink_owners_of_elements(
elements: list[ElementIdArrayItem],
) -> list[ErrorItem | HotlinkOwnersOfElement]
Tells for each element whether it comes from a hotlinked module, and returns the hotlink element that contains it and the hotlink instance it belongs to. Available from Archicad 27.
Parameters:
-
elements(list[ElementIdArrayItem]) –A list of elements.
Returns:
-
list[ErrorItem | HotlinkOwnersOfElement]–The hotlink each element comes from, aligned with the input.
get_hotlink_proxy_element_table ¶
get_hotlink_proxy_element_table(
hotlink_instances: list[ElementIdArrayItem],
) -> list[ErrorItem | HotlinkProxyElementTable]
Maps the proxy elements of placed hotlink instances to the elements of the source file they were made from, so an element seen in a hotlinked module can be traced back to its source element.
Parameters:
-
hotlink_instances(list[ElementIdArrayItem]) –The placed hotlink instances: elements of type Hotlink, for example the hotlinkId of an element inside one. Not the nodes GetHotlinks returns.
Returns:
-
list[ErrorItem | HotlinkProxyElementTable]–One item per requested instance, in order: its proxy elements with the source elements they were made from, or an error.
get_hotlink_source_status ¶
get_hotlink_source_status(
hotlinks: list[HotlinkSourceReference],
) -> list[ErrorItem | HotlinkSourceStatusResult]
Tells for each hotlink source file whether it is available, missing, not accessible, incompatible or offline. Available from Archicad 27.
Parameters:
-
hotlinks(list[HotlinkSourceReference]) –The source files of hotlinks of the project, for example the location of each node GetHotlinks returns.
Returns:
-
list[ErrorItem | HotlinkSourceStatusResult]–One item per requested hotlink, in order: the availability of its source file, or an error.
get_hotlinks ¶
get_hotlinks() -> list[Hotlink]
Gets the file system locations (path) of the hotlink modules and the instance elements placed from each node. The hotlinks can have tree hierarchy in the project.
Returns:
-
list[Hotlink]–A list of hotlink nodes.
get_last_3d_default_levels ¶
get_last_3d_default_levels(
element_types: list[ElementType],
) -> list[float]
Gets the last 3D default levels of the given element types' defaults.
Parameters:
-
element_types(list[ElementType]) –The element types to get the last 3D default level of.
Returns:
-
list[float]–The last 3D default level of each element type, in the order of elementTypes, in meters.
get_note_auto_text_keywords ¶
get_note_auto_text_keywords(
auto_text_ids: list[int],
) -> list[ErrorItem | NoteAutoTextKeyword]
Retrieves the keywords of note autotexts (the autotexts of dimension, label and other element notes) by their numeric API_NoteAutotextID values. Available from Archicad 26.
Parameters:
-
auto_text_ids(list[int]) –Numeric values of the API_NoteAutotextID enumeration of the Archicad API (the autotexts of dimension, label and other element notes).
Returns:
-
list[ErrorItem | NoteAutoTextKeyword]–One result per input id, in the same order.
get_note_autotexts ¶
get_note_autotexts(
note_owner_type: ElementType,
*,
dimension_appearance: DimensionAppearance | None = None,
) -> list[NoteAutotextDetails]
Retrieves the autotexts available in the notes of an element type (e.g. a Dimension), each with the element types it is available for. The autotexts are identified by the numeric value of their API_NoteAutotextID. For a Dimension, the optional dimensionAppearance (Linear by default) chooses the dimension type. Needs Archicad 26 or later.
Parameters:
-
note_owner_type(ElementType) –The type of the element that owns the note, e.g. 'Dimension', 'RadialDimension', 'LevelDimension' or 'AngleDimension'.
-
dimension_appearance(DimensionAppearance | None, default:None) –Optional dimension type, as in the Dimension Settings, whose note autotexts are listed when noteOwnerType is 'Dimension'. Defaults to Linear. Not allowed with other owner types.
Returns:
-
list[NoteAutotextDetails]–The autotexts available in the notes of the given owner type, in ascending order of autotextId.
get_project_info ¶
get_project_info() -> GetProjectInfoResult
get_project_info_fields ¶
get_project_info_fields() -> list[ProjectInfoField]
Retrieves the names and values of all project info fields.
Returns:
-
list[ProjectInfoField]–A list of project info fields.
get_project_info_groups ¶
get_project_info_groups() -> list[ProjectInfoGroup]
Retrieves the Project Info groups in their order, each with its fields: id, name, value and, when exactly one project info autotext has the name of the field, the autotext key that SetProjectInfoField takes. Available from Archicad 30.
Returns:
-
list[ProjectInfoGroup]–The Project Info groups in their order in the Project Info dialog. Available from Archicad 30.
get_project_notes ¶
get_project_notes() -> GetProjectNotesResult
Gets the Project Notes of the project (File > Info > Project Notes): client, project name, company, address, architect, draftsmen, project status, date of issue, keywords and notes.
Returns:
get_project_preferences ¶
get_project_preferences(
preference_types: None
| list[ProjectPreferenceType] = None,
) -> GetProjectPreferencesResult
Gets pages of the project preferences (Options > Project Preferences): the working units, the dimensions, the calculation units, the calculation rules (conditional element rules and insulation and air fills), the zones, the reference levels, the legacy settings, the layouts settings and the data safety settings (the temporary folder), the Floor Plan Cut Plane Settings, and the Imaging and Calculation page of the Work Environment.
Parameters:
-
preference_types(None | list[ProjectPreferenceType], default:None) –The preference pages to get. Every page when missing.
Returns:
get_rendering_scenes ¶
get_rendering_scenes() -> GetRenderingScenesResult
Gets the names of the rendering scenes of the project (the Scene list of the PhotoRendering Settings palette), the most recently used first, and the name of the current scene.
Returns:
get_renovation_status_names ¶
get_renovation_status_names() -> list[
ErrorItem | RenovationStatusName
]
Gets the names the running Archicad shows for the renovation statuses Existing, New and Demolished (localized). Available from Archicad 27.
Returns:
-
list[ErrorItem | RenovationStatusName]–The renovation statuses an element can have, in the order Existing, New, Demolished.
get_stories ¶
get_stories() -> GetStoriesResult
Retrieves information about the story structure of the currently loaded project: index, floor id, name, level, height and, from Archicad 28, the IFC GlobalId of each story.
Returns:
get_sun_settings ¶
get_sun_settings() -> GetSunSettingsResult
Gets the project's date and time (Options > Project Preferences > Location Settings), the sun position Archicad calculates for them at the project location, and the sun and ambient light settings.
Returns:
get_survey_point_transformation ¶
get_survey_point_transformation() -> (
GetSurveyPointTransformationResult
)
Gets the 3x4 matrix that transforms points from the Project Origin coordinate system into the Survey Point coordinate system, row by row, and its inverse when it is invertible. Read only. Available from Archicad 27.
Returns:
insert_story ¶
insert_story(
story_index: int,
position: StoryInsertionPosition,
name: None | str = None,
height: None | float = None,
disp_on_sections: None | bool = None,
) -> StoryParameters
Inserts one new story directly above or below an existing story, with its name, height and level line display, and returns the new story as GetStories reports it. Other stories are never deleted; their indices and levels can change with the insertion as in Archicad's Story Settings dialog, so read them again with GetStories.
Parameters:
-
story_index(int) –The index of an existing story (see GetStories) next to which the new story is inserted.
-
position(StoryInsertionPosition) – -
name(None | str, default:None) –The name of the new story. Default is an empty name.
-
height(None | float, default:None) –The height of the new story, greater than zero. Default is the height of the story of storyIndex.
-
disp_on_sections(None | bool, default:None) –Whether the level line of the new story appears on sections and elevations. Default is what Archicad gives a new story.
Returns:
-
StoryParameters–The new story, as GetStories reports it after the insertion.
interpret_auto_texts ¶
interpret_auto_texts(
auto_texts: list[str],
element_id: ElementId | None = None,
) -> list[ErrorItem | InterpretedAutoText]
Resolves one or more autotexts (e.g. '
Parameters:
-
auto_texts(list[str]) –The autotexts to resolve, either as they are written in the content of a Text or Label element, e.g. '
' or ' ', or as bare keys without the surrounding '<' and '>', e.g. 'LAYOUTID'. -
element_id(ElementId | None, default:None) –Optional. The element in whose context the autotexts are resolved, e.g. a Text on a layout for layout autotexts. When omitted, they are resolved without an element context.
Returns:
-
list[ErrorItem | InterpretedAutoText]–One result per input autotext, in the same order.
merge_file ¶
merge_file(
source_location: str,
origin: HotlinkOrigin | None = None,
rotation_angle: None | float = None,
mirrored: None | bool = None,
floor_index: None | int = None,
) -> list[ElementIdArrayItem]
Merges an Archicad project or module file into the model, as File > Interoperability > Merge does, at an origin, rotation and mirroring, each story of the file on the story with the same index (or from floorIndex on). The Archicad API has no merge, so the file is placed as a hotlink and the hotlink is broken, in one undo step, and the elements that are new afterwards are returned; Archicad leaves them grouped together. A file the project already hotlinks is refused, because breaking would break that hotlink too.
Parameters:
-
source_location(str) –Absolute path of the file to merge: an Archicad project (.pln, .pla) or module (.mod). It cannot be a file the project already hotlinks: breaking that hotlink would turn its placed instances into ordinary elements too.
-
origin(HotlinkOrigin | None, default:None) –Optional. Where the origin of the file lands in the project. Defaults to the project origin; if z is omitted, it is 0.
-
rotation_angle(None | float, default:None) –Optional rotation about the origin, counter- clockwise, in radians. Defaults to 0.
-
mirrored(None | bool, default:None) –Optional. Reflects the file's local X axis before the rotation. Defaults to false.
-
floor_index(None | int, default:None) –Optional story of the project that the story with index 0 of the file goes to; the other stories of the file follow it. Defaults to 0, so each story of the file goes to the story with the same index.
Returns:
-
list[ElementIdArrayItem]–The elements the merge added to the model, every element of the file's model. Archicad leaves them grouped together, as it leaves the elements of a broken hotlink; UngroupElements dissolves the group.
modify_story ¶
modify_story(
story_index: int,
name: None | str = None,
level: None | float = None,
height: None | float = None,
disp_on_sections: None | bool = None,
) -> StoryParameters
Changes the name, level, height or level line display of one story, and returns the story as GetStories reports it. It never adds or deletes a story. level moves only this story; height moves every story above with the top of this one, as in Archicad's Story Settings dialog. The elements of a moved story move with it.
Parameters:
-
story_index(int) –The index of the story to modify (see GetStories).
-
name(None | str, default:None) –The new name of the story.
-
level(None | float, default:None) –The new level of the story. Only this story moves: the story below gets taller or shorter, and the stories above stay where they are unless height is given too. It must stay above the level of the story below, and, without height, below the level of the story above. On the top story without height its top stays where it is: moving it up makes it shorter by as much, and moving it down taller.
-
height(None | float, default:None) –The new height of the story, greater than zero. As in Archicad's Story Settings dialog, every story above moves up or down with the top of this story and keeps its height.
-
disp_on_sections(None | bool, default:None) –Whether the level line of the story appears on sections and elevations.
Returns:
-
StoryParameters–The modified story, as GetStories reports it after the change.
move_project_info_fields ¶
move_project_info_fields(
project_info_fields: list[ProjectInfoFieldMove],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Moves fields of the Project Info groups to a group, before another field of it or to its end. A subfield of a calculated field moves with its parent field. Available from Archicad 30.
Parameters:
-
project_info_fields(list[ProjectInfoFieldMove]) –The fields of the Project Info groups to move, in the order the moves are made. A subfield of a calculated field cannot be moved on its own, it moves with its parent field.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
move_project_info_groups ¶
move_project_info_groups(
project_info_groups: list[ProjectInfoGroupMove],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Moves Project Info groups before another group, or to the end of the group list when no other group is given. Available from Archicad 30.
Parameters:
-
project_info_groups(list[ProjectInfoGroupMove]) –The Project Info groups to move, in the order the moves are made.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
new_project ¶
new_project(
new_and_reset: None | bool = None,
) -> SuccessfulExecutionResult
Starts a new, untitled project from the template set in Archicad's New Project settings, as File > New does; with newAndReset also the working environment is reset, as New and Reset All does. The unsaved changes of the open project are discarded, as with OpenProject.
Parameters:
-
new_and_reset(None | bool, default:None) –Optional. Also reset the working environment to the template's, as File > New > New and Reset All does, instead of keeping the current one as File > New does. Defaults to false.
Returns:
open_project ¶
open_project(
project_file_path: str,
) -> SuccessfulExecutionResult
Opens the given project. The unsaved changes of the open project are discarded without asking: Archicad has no query for them, so call SaveProject first when they must be kept.
Parameters:
-
project_file_path(str) –The target project file to open.
Returns:
photo_render ¶
photo_render(
image_file_path: str,
format: None | PhotoRenderFormat = None,
scene_name: None | str = None,
*,
overwrite: None | bool = None,
width: None | int = None,
height: None | int = None,
resolution: None | int = None,
) -> SuccessfulExecutionResult
Renders the 3D model with the current rendering scene, or with the given one, as Document > Creative Imaging > PhotoRender Projection does, and saves the image to a file (png, jpg, bmp, tiff or gif). The image size, resolution and quality come from the scene; a width, height or resolution given here is used for this render only, the scene is not changed. With overwrite false it refuses to replace an existing file; a folder that does not exist is refused before rendering.
Parameters:
-
image_file_path(str) –Absolute path of the image file to write. Its folder must exist: a missing folder is refused before anything is rendered. An existing file is overwritten, unless overwrite is false.
-
format(None | PhotoRenderFormat, default:None) – -
scene_name(None | str, default:None) –Optional. The rendering scene to render with, one of the names GetRenderingScenes returns. It is made the current scene first, as SetCurrentRenderingScene does, and stays current afterwards. Omitted, the current scene is used.
-
overwrite(None | bool, default:None) –Optional, true by default. false refuses to render when a file already exists at imageFilePath, and writes nothing.
-
width(None | int, default:None) –Optional. The width of the image in pixels (the Size field of the PhotoRendering Settings palette). Omitted, the width of the scene is used. The image settings of the scene are changed for this render only and restored afterwards.
-
height(None | int, default:None) –Optional. The height of the image in pixels (the Size field of the PhotoRendering Settings palette). Omitted, the height of the scene is used. The image settings of the scene are changed for this render only and restored afterwards.
-
resolution(None | int, default:None) –Optional. The resolution of the image in dpi (the Resolution field of the PhotoRendering Settings palette). Omitted, the resolution of the scene is used. The image settings of the scene are changed for this render only and restored afterwards.
Returns:
print_view ¶
print_view(
grid: None | bool = None,
fix_text: None | bool = None,
scale: None | int = None,
print_area: None | PrintArea = None,
) -> SuccessfulExecutionResult
Prints from the current view.
Parameters:
-
grid(None | bool, default:None) –Print the grid. The default is false.
-
fix_text(None | bool, default:None) –Use fixed text size. The default is false.
-
scale(None | int, default:None) –Print scale. The default is 100.
-
print_area(None | PrintArea, default:None) –The area to print. The default is 'currentView'.
Returns:
rebuild_view ¶
rebuild_view(
regenerate: None | bool = None,
) -> SuccessfulExecutionResult
Rebuilds the current view.
Parameters:
-
regenerate(None | bool, default:None) –Regenerate the view. The default is false, meaning the view will not be regenerated, but rebuilt.
Returns:
rename_project_info_fields ¶
rename_project_info_fields(
project_info_fields: list[ProjectInfoFieldRename],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Renames custom fields of the Project Info groups. Fixed (built-in) fields cannot be renamed. Available from Archicad 30.
Parameters:
-
project_info_fields(list[ProjectInfoFieldRename]) –The fields of the Project Info groups to rename, each with its new name. Fixed (built-in) fields cannot be renamed.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
rename_project_info_groups ¶
rename_project_info_groups(
project_info_groups: list[ProjectInfoGroupRename],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Renames Project Info groups. Available from Archicad 30.
Parameters:
-
project_info_groups(list[ProjectInfoGroupRename]) –The Project Info groups to rename, each with its new name.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
resolve_names ¶
resolve_names(
names: list[NameToResolve],
max_close_matches: None | int = None,
) -> list[ResolvedName]
Looks up words or phrases (for example from a user's question) among the names of the open project before they are passed to other commands: stories, layers, layer combinations, building materials, composites, profiles, surfaces, fills, lines, zone categories, element types (by API name and, from Archicad 27, by the name the Archicad interface shows), properties (by name, and by group and name together) and classifications (systems by name and version, items of every system by name and ID). For each name it returns 'found' with the items named exactly so, 'closeMatches' with the nearest names, best first (ranked by differences in case, accents, spacing and separators, shared words, one name containing the other and a few differing characters), or 'notFound' when nothing in the project is close, meaning the project has no such item and it must not be guessed. Each match carries what the other commands take: the story index, the attribute id and index, the elementType, the propertyId (with the property's group, value type and the classification items a custom property is available for), or the classificationSystemId and classificationItemId. Matching is lexical and deterministic. Read only.
Parameters:
-
names(list[NameToResolve]) –The words or phrases to look up in the open project, for example taken from a user's question.
-
max_close_matches(None | int, default:None) –The most close matches returned for one word, best first. The default is 5.
Returns:
-
list[ResolvedName]–One result for each of the given names, in the same order.
save_as_module_file ¶
save_as_module_file(
module_file_path: str,
elements: None | list[ElementIdArrayItem] = None,
*,
overwrite: None | bool = None,
) -> SuccessfulExecutionResult
Saves the given elements, or the current selection, as a hotlink module (.mod) file. With overwrite false it refuses to replace an existing file.
Parameters:
-
module_file_path(str) –Absolute path of the .mod file to write. An existing file is overwritten, unless overwrite is false. The current window must be a floor plan, section, elevation or detail.
-
elements(None | list[ElementIdArrayItem], default:None) –Optional. The elements that go into the module; omitted, the current selection does, as Save Selection as Module would. Pass GetAllElements for the whole project. Archicad 25 and 26 support the selection form only.
-
overwrite(None | bool, default:None) –Optional, true by default. false refuses to save when a file already exists at moduleFilePath, and writes nothing.
Returns:
save_current_window_as_image ¶
save_current_window_as_image(
image_file_path: str,
format: ImageFormat | None = None,
color_depth: ImageColorDepth | None = None,
dithered: None | bool = None,
entire_drawing: None | bool = None,
*,
overwrite: None | bool = None,
) -> SaveCurrentWindowAsImageResult
Saves what the current window shows as an image file (png, jpg, bmp, tiff or gif), as File > Save as does with a picture format. Master layout windows are not supported: save a layout that uses the master layout instead. With overwrite false it refuses to replace an existing file.
Parameters:
-
image_file_path(str) –Absolute path of the image file to write. An existing file is overwritten, unless overwrite is false.
-
format(ImageFormat | None, default:None) – -
color_depth(ImageColorDepth | None, default:None) – -
dithered(None | bool, default:None) –Optional, false by default. Whether the image is dithered when its color depth drops colors.
-
entire_drawing(None | bool, default:None) –Optional, false by default. Whether the image covers the entire drawing of a 2D window instead of its current zoom, as the Entire Drawing option of the Save as picture dialog does.
-
overwrite(None | bool, default:None) –Optional, true by default. false refuses to save when a file already exists at imageFilePath, and writes nothing.
Returns:
save_project ¶
save_project(
project_path: None | str = None,
*,
overwrite: None | bool = None,
) -> SuccessfulExecutionResult
Saves the currently opened project, in place or to a given path. With overwrite false it refuses to replace an existing file at the path.
Parameters:
-
project_path(None | str, default:None) –Optional. Full path of a .pln file to save the project to, as File > Save As does: the open project then refers to that file. This saves an untitled project, or one opened from an older Archicad version, which cannot be saved in place. An existing file at the path is overwritten, unless overwrite is false. When omitted, or when it is the project's own file, the project is saved in place, which keeps the refusal of a project opened read- only.
-
overwrite(None | bool, default:None) –Optional, true by default. Only together with projectPath: false refuses to save when a file already exists at projectPath, the project's own file included, and writes nothing.
Returns:
save_project_as_archive ¶
save_project_as_archive(
archive_file_path: str,
include_library_parts: None | bool = None,
include_properties: None | bool = None,
include_textures: None | bool = None,
include_background_picture: None | bool = None,
*,
overwrite: None | bool = None,
) -> SuccessfulExecutionResult
Saves the open project as an archive (.pla) file, with the library parts it uses inside. With overwrite false it refuses to replace an existing file.
Parameters:
-
archive_file_path(str) –Absolute path of the .pla archive to write. An existing file is overwritten, unless overwrite is false. The archive becomes the open project, as Save As does.
-
include_library_parts(None | bool, default:None) –Optional, true by default. Whether the library parts the project uses go into the archive, which makes the archive usable as a linked library of another project.
-
include_properties(None | bool, default:None) –Optional, true by default. Whether the properties go into the archive.
-
include_textures(None | bool, default:None) –Optional, false by default. Whether the linked textures go into the archive.
-
include_background_picture(None | bool, default:None) –Optional, false by default. Whether the background picture goes into the archive.
-
overwrite(None | bool, default:None) –Optional, true by default. false refuses to save when a file already exists at archiveFilePath, and writes nothing.
Returns:
set_auto_intersect ¶
set_auto_intersect(
is_on: bool,
) -> SuccessfulExecutionResult
Turns Auto-Intersection on or off. It is a setting of the running Archicad, not of the project; remember to restore the previous state afterwards.
Parameters:
-
is_on(bool) –Turn Auto-Intersection on or off.
Returns:
set_current_rendering_scene ¶
set_current_rendering_scene(
scene_name: str,
) -> SuccessfulExecutionResult
Makes the given rendering scene the current one, as selecting it in the PhotoRendering Settings palette does.
Parameters:
-
scene_name(str) –The name of the rendering scene to make current, one of the names GetRenderingScenes returns.
Returns:
set_geo_location ¶
set_geo_location(
project_location: None | ProjectLocationUpdate = None,
survey_point: None | SurveyPointUpdate = None,
) -> SuccessfulExecutionResult
Sets the project location details: the project location, and the survey point's position, geo-referencing parameters, visibility and lock state (the lock from Archicad 26). Omitted fields stay unchanged.
Parameters:
-
project_location(None | ProjectLocationUpdate, default:None) – -
survey_point(None | SurveyPointUpdate, default:None) –
Returns:
set_last_3d_default_levels ¶
set_last_3d_default_levels(
element_types: list[ElementType], levels: list[float]
) -> SuccessfulExecutionResult
Sets the last 3D default levels of the given element types' defaults.
Parameters:
-
element_types(list[ElementType]) –The element types to set the last 3D default level of.
-
levels(list[float]) –The new last 3D default level of each element type, in the order of elementTypes, in meters.
Returns:
set_place_settings ¶
set_place_settings(
place_info: PlaceSettingsUpdate,
) -> PlaceInfo
Changes the place settings of the project: location (longitude, latitude, altitude, north), date, time, summer time and time zone. Only the given fields change. Returns the settings read back, with the sun position Archicad calculated for them. Available from Archicad 27.
Parameters:
-
place_info(PlaceSettingsUpdate) –
Returns:
set_project_info_field ¶
set_project_info_field(
project_info_id: str, project_info_value: str
) -> None
Sets the value of a project info field.
Parameters:
-
project_info_id(str) –The id of the project info field.
-
project_info_value(str) –The new value of the project info field. An empty string clears the field.
set_project_notes ¶
set_project_notes(
client: None | str = None,
project_name: None | str = None,
company: None | str = None,
street: None | str = None,
city: None | str = None,
country: None | str = None,
postal_code: None | str = None,
architect: None | str = None,
draftsmen: None | str = None,
project_status: None | str = None,
date_of_issue: None | str = None,
keywords: None | str = None,
notes: None | str = None,
) -> SuccessfulExecutionResult
Changes the Project Notes of the project (File > Info > Project Notes). Only the given fields are changed; texts longer than the field Archicad stores are truncated. architect and draftsmen are full names that Archicad keeps as name parts: a new name is stored in the given name with the other parts cleared, and the parts of a name that is not given or not changed are kept.
Parameters:
-
client(None | str, default:None) –Client.
-
project_name(None | str, default:None) –Project name.
-
company(None | str, default:None) –Company.
-
street(None | str, default:None) –Street.
-
city(None | str, default:None) –City.
-
country(None | str, default:None) –Country.
-
postal_code(None | str, default:None) –Postal code.
-
architect(None | str, default:None) –Architect: the full name of the Project Info contact. Archicad keeps it as name parts (title prefix, given, middle and family name, title suffix); SetProjectNotes puts a new value into the given name and clears the other parts, so it reads back unchanged. Use SetProjectInfoField to set the parts.
-
draftsmen(None | str, default:None) –Draftsmen: the full name of the Project Info CAD technician, kept as name parts like architect.
-
project_status(None | str, default:None) –Project status.
-
date_of_issue(None | str, default:None) –Date of issue (free text, as typed in Project Notes).
-
keywords(None | str, default:None) –Keywords.
-
notes(None | str, default:None) –Notes.
Returns:
set_project_preferences ¶
set_project_preferences(
working_units: None
| WorkingUnitPreferencesUpdate = None,
dimensions: DimensionPreferencesUpdate | None = None,
calculation_units: CalculationUnitPreferencesUpdate
| None = None,
zones: None | ZonePreferencesUpdate = None,
*,
reference_levels: None
| ProjectReferenceLevelsUpdate = None,
floor_plan_cut_plane: FloorPlanCutPlanePreferencesUpdate
| None = None,
legacy: LegacyPreferencesUpdate | None = None,
imaging_and_calculation: ImagingAndCalculationPreferencesUpdate
| None = None,
layouts: LayoutPreferencesUpdate | None = None,
calculation_rules: CalculationRulePreferencesUpdate
| None = None,
) -> SetProjectPreferencesResult
Changes pages of the project preferences (Options > Project Preferences): the working units, the dimensions, the calculation units, the calculation rules, the zones, the reference levels, the legacy settings and the layouts settings, the Floor Plan Cut Plane Settings, and the Imaging and Calculation page of the Work Environment. The data safety page is read only. Only the given fields change, the rest of each page keeps its value. In Teamwork the PreferencesDialog lockable object set has to be reserved first (ReserveLockableObjectSet). Available from Archicad 27.
Parameters:
-
working_units(None | WorkingUnitPreferencesUpdate, default:None) – -
dimensions(DimensionPreferencesUpdate | None, default:None) – -
calculation_units(CalculationUnitPreferencesUpdate | None, default:None) – -
zones(None | ZonePreferencesUpdate, default:None) – -
reference_levels(None | ProjectReferenceLevelsUpdate, default:None) – -
floor_plan_cut_plane(FloorPlanCutPlanePreferencesUpdate | None, default:None) – -
legacy(LegacyPreferencesUpdate | None, default:None) – -
imaging_and_calculation(ImagingAndCalculationPreferencesUpdate | None, default:None) – -
layouts(LayoutPreferencesUpdate | None, default:None) – -
calculation_rules(CalculationRulePreferencesUpdate | None, default:None) –
Returns:
set_stories ¶
set_stories(
stories: list[StorySettings],
) -> SuccessfulExecutionResult
Sets the story structure of the currently loaded project to the given list of stories. Existing stories outside the list are deleted, and Archicad deletes every element whose home story they are with them; dryRun lists those stories with the number of elements on each, without changing anything. To add, change or delete a single story, use InsertStory or DeleteStory instead.
Parameters:
-
stories(list[StorySettings]) –A list of story settings, used as input for creating or modifying multiple stories.
Returns:
set_stories_dry_run ¶
set_stories_dry_run(
stories: list[StorySettings],
) -> SetStoriesResult
Preview this command without applying its changes. Sets the story structure of the currently loaded project to the given list of stories. Existing stories outside the list are deleted, and Archicad deletes every element whose home story they are with them; dryRun lists those stories with the number of elements on each, without changing anything. To add, change or delete a single story, use InsertStory or DeleteStory instead.
Parameters:
-
stories(list[StorySettings]) –A list of story settings, used as input for creating or modifying multiple stories.
Returns:
update_hotlinks ¶
update_hotlinks(
hotlink_nodes: list[HotlinkNodeReference],
) -> list[
FailedExecutionResult | SuccessfulExecutionResult
]
Re-reads the source files of hotlink module nodes and refreshes their cached content in the project, as the Hotlink Manager's Update button does.
Parameters:
-
hotlink_nodes(list[HotlinkNodeReference]) –The hotlink nodes to update, from GetHotlinks or CreateHotlinkNodes. Each node's cached content is re-read from its source file, as the Hotlink Manager's Update button does.
Returns:
-
list[FailedExecutionResult | SuccessfulExecutionResult]–A list of execution results.
Related types¶
These include the parameter and result models used inside the client. The command signatures above show what to pass and what is returned.
BreakHotlinkNodesParametersBreakHotlinkNodesResultCalculateSunPositionParametersCalculateSunPositionResultChangeHotlinkInstancesParametersChangeHotlinkInstancesResultChangeHotlinkNodesParametersChangeHotlinkNodesResultConvertUnitValuesParametersConvertUnitValuesResultCreateHotlinkInstancesParametersCreateHotlinkInstancesResultCreateHotlinkNodesParametersCreateHotlinkNodesResultCreateProjectInfoFieldsParametersCreateProjectInfoFieldsResultCreateProjectInfoGroupsParametersCreateProjectInfoGroupsResultDeleteHotlinkNodesParametersDeleteHotlinkNodesResultDeleteProjectInfoFieldsParametersDeleteProjectInfoFieldsResultDeleteProjectInfoGroupsParametersDeleteProjectInfoGroupsResultDeleteStoryParametersDeleteStoryResultFindDimensionStandardParametersFindDimensionStandardResultGetAllAutoTextKeysResultGetAutoIntersectResultGetAutoTextKeysParametersGetAutoTextKeysResultGetAutoTextNameParametersGetAutoTextNameResultGetCalculationUnitsResultGetCoordinateOriginsResultGetCurrentViewImageParametersGetCurrentViewImageResultGetDimensionStandardsParametersGetDimensionStandardsResultGetExportToleranceResultGetGeoLocationResultGetHotlinkOwnersOfElementsParametersGetHotlinkOwnersOfElementsResultGetHotlinkProxyElementTableParametersGetHotlinkProxyElementTableResultGetHotlinkSourceStatusParametersGetHotlinkSourceStatusResultGetHotlinksResultGetLast3DDefaultLevelsParametersGetLast3DDefaultLevelsResultGetNoteAutoTextKeywordsParametersGetNoteAutoTextKeywordsResultGetNoteAutotextsParametersGetNoteAutotextsResultGetProjectInfoFieldsResultGetProjectInfoGroupsResultGetProjectInfoResultGetProjectNotesResultGetProjectPreferencesParametersGetProjectPreferencesResultGetRenderingScenesResultGetRenovationStatusNamesResultGetStoriesResultGetSunSettingsResultGetSurveyPointTransformationResultInsertStoryParametersInsertStoryResultInterpretAutoTextsParametersInterpretAutoTextsResultMergeFileParametersMergeFileResultModifyStoryParametersModifyStoryResultMoveProjectInfoFieldsParametersMoveProjectInfoFieldsResultMoveProjectInfoGroupsParametersMoveProjectInfoGroupsResultNewProjectParametersOpenProjectParametersPhotoRenderParametersPrintViewParametersRebuildViewParametersRenameProjectInfoFieldsParametersRenameProjectInfoFieldsResultRenameProjectInfoGroupsParametersRenameProjectInfoGroupsResultResolveNamesParametersResolveNamesResultSaveAsModuleFileParametersSaveCurrentWindowAsImageParametersSaveCurrentWindowAsImageResultSaveProjectAsArchiveParametersSaveProjectParametersSetAutoIntersectParametersSetCurrentRenderingSceneParametersSetGeoLocationParametersSetLast3DDefaultLevelsParametersSetPlaceSettingsParametersSetPlaceSettingsResultSetProjectInfoFieldParametersSetProjectNotesParametersSetProjectPreferencesParametersSetProjectPreferencesResultSetStoriesParametersSetStoriesResultUpdateHotlinksParametersUpdateHotlinksResultAutoTextAutoTextKeyAutoTextNameCalculationRulePreferencesUpdateCalculationUnitPreferencesUpdateConvertedUnitValueCreatedProjectInfoFieldDimensionAppearanceDimensionPreferencesUpdateDimensionStandardElementIdElementIdArrayItemElementTypeErrorItemFailedExecutionResultFloorPlanCutPlanePreferencesUpdateHotlinkHotlinkInstanceChangeHotlinkInstanceCreationHotlinkNodeHotlinkNodeChangeHotlinkNodeCreatedHotlinkNodeReferenceHotlinkOriginHotlinkOwnersOfElementHotlinkProxyElementTableHotlinkSourceReferenceHotlinkSourceStatusResultImageColorDepthImageFormatImagingAndCalculationPreferencesUpdateInterpretedAutoTextLayoutPreferencesUpdateLegacyPreferencesUpdateNameToResolveNoteAutoTextKeywordNoteAutotextDetailsPhotoRenderFormatPlaceInfoPlaceSettingsUpdatePrintAreaProjectInfoFieldProjectInfoFieldDataProjectInfoFieldIdArrayItemProjectInfoFieldMoveProjectInfoFieldRenameProjectInfoGroupProjectInfoGroupDataProjectInfoGroupIdArrayItemProjectInfoGroupMoveProjectInfoGroupRenameProjectLocationUpdateProjectPreferenceTypeProjectReferenceLevelsUpdateRenovationStatusNameResolvedNameStoryInsertionPositionStoryParametersStorySettingsSuccessfulExecutionResultSunDateTimeUpdateSunPositionSurveyPointUpdateUnitValueConversionDataViewImageFormatViewImageSourceWorkingUnitPreferencesUpdateZonePreferencesUpdate