drawing scale [SOLVED]

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-01-14
09:17 AM
- last edited on
‎2023-08-01
04:37 PM
by
Doreena Deng
‎2014-01-14
09:17 AM
I am trying to add drawing using the API. I am able to do so but the scale of the drawing done with the API is not the same as manually doing it (drag-drop). (See attached image file.)
The first image (above) is done manually while the second image (below) is done usingACAPI_Element_Create() function.
I have already tried modifying theratio value of the drawing element but it just zoomed the second image instead.
The first image (above) is done manually while the second image (below) is done using
I have already tried modifying the
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-01-15 06:46 AM
‎2014-01-15
06:46 AM
It seems like the API-generated drawing's scale is based on the original floor plan scale.
The attached picture is a screenshot of the lower-right of the floor plan and the same API-generated drawing. They are of the same scale.
Now, how to set this API-generated drawing to the same scale as the first post (the detail's scale) is still unknown [to me, at least].
EDIT
Is there a way to set theAPI_DrawingType.drawingScale (Drawing Scale in Properties) and/or API_DrawingType.parentOriginalScale (Original Scale in Properties) before creating the drawing element (ACAPI_Element_Create() )?
The attached picture is a screenshot of the lower-right of the floor plan and the same API-generated drawing. They are of the same scale.
Now, how to set this API-generated drawing to the same scale as the first post (the detail's scale) is still unknown [to me, at least].
EDIT
Is there a way to set the
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-01-15 11:07 AM
‎2014-01-15
11:07 AM
I figured it out.
What I initially have done was create a drawing element using an item's GUID from Project Map (API_ProjectMap).
It is supposed to be from View Map (API_PublicViewMap).
What I initially have done was create a drawing element using an item's GUID from Project Map (API_ProjectMap).
It is supposed to be from View Map (API_PublicViewMap).
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-01-15 08:49 PM
‎2014-01-15
08:49 PM
I don't know the API, I am not a programmer, but the View Map makes sense as it stores the scale, while the Project Map always works with the currently active scale, which can give unintended results.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28