Set 3D view
set_3d_viewSet up the 3D window in Archicad with perspective or axonometric views, defining camera, sun, and style for visual capture and verification.
Instructions
Sets up the 3D window. Easiest overview: {mode:'perspective', azimuth: 225, altitude: 30} (camera south-west of the model, fits the whole model). Exact camera: {mode:'perspective', camera:{x,y,z}, target:{x,y,z}, viewCone}. Axonometry: {mode:'axonometric', projection:'Isometric', azimuth} or {projection:'TopView'}. Also: sun, style (3D style name), styleSettings (shading/hidden line, shadows...), windowSize, stories range, elementTypes filter, cutPlanes. Opens the 3D window unless open3D is false. Returns {changed, camera {verified, warning?} (perspective) | axonometric {viewMatrixChanged, warning?}, projection, window}. Follow with capture_view to see the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sun | No | Sun position for shading/shadows (sets 'given by angles') | |
| mode | No | Projection mode. Default: perspective when camera/target/viewCone/roll/distance are given, axonometric when projection/tranmat are given, otherwise the current mode | |
| roll | No | Perspective camera roll in degrees (0 = level horizon) | |
| style | No | 3D style name to make current (localized; see get_3d_view style.available) | |
| camera | No | Perspective: camera (eye) position in m, z = absolute elevation (e.g. 1.6 above a story level for eye height) | |
| open3D | No | Bring the 3D window to the front afterwards (default true) | |
| target | No | Perspective: point the camera looks at (m). With azimuth/altitude it is the orbit center (default: center of the model) | |
| azimuth | No | Degrees CCW from +X (east; 90 = north). Perspective orbit: direction FROM the target TO the camera, e.g. 225 = camera south-west of the model looking north-east. Axonometric: the camera azimuth of the parallel projection | |
| stories | No | 3D story range filter (Filter and Cut Elements in 3D) | |
| tranmat | No | Axonometric: raw 3x4 view matrix (row-major, as returned by get_3d_view) — copy it from a view you liked | |
| altitude | No | Degrees above the horizon of the view direction's source: perspective orbit camera elevation angle (default 30); axonometric: makes a free 'Parallel' view from that elevation (experimental) | |
| distance | No | Perspective orbit: camera–target distance in m (default: the whole model fits in view) | |
| viewCone | No | Perspective field of view in degrees (default: current or 60; 35-50 = natural, 70-90 = wide interior shots) | |
| cutPlanes | No | 3D cutting planes | |
| projection | No | Axonometric (parallel) projection preset. TopView = plan from above, FrontView/SideView = elevations, Isometric/Dimetric/Monometric/Frontal = classic axonometries (rotated by azimuth), *Bottom = seen from below, Parallel = free parallel view (use with azimuth + altitude) | |
| windowSize | No | Size of the 3D window image in pixels (persists; capture_view width/height changes it only temporarily) | |
| elementTypes | No | Show only these element types in 3D, e.g. ['Wall','Slab','Roof','Column'] (type names as in get_supported_element_types), or ['all'] | |
| styleSettings | No | Edits the CURRENT 3D style definition (applied after 'style'; affects every view using that style), e.g. {model:'HiddenLine'} for a line drawing or {model:'Shading', sunShadows:'AllSurfacesContoursOn'}. Current values: get_3d_view style | |
| twoPointPerspective | No | Perspective: keep vertical lines vertical (2-point perspective) |