Archicad C++ API
About Archicad add-on development using the C++ API.

Changing drawing bounds doesn’t work

Anonymous
Not applicable
Hello

I am trying to change drawing bounds (element.drawing.bounds), but it doesn’t change. I am able to change other things in the drawing but not the bounds..
Thanks in advance.
8 REPLIES 8
Ralph Wessel
Mentor
Does changing the scaling ratio work?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
Does changing the scaling ratio work?
Drawingscale and parentoriginalscale are both output only.
Ratio works but changing only the drawing size and not bounds of the drawing - so I have to update / change bounds myself.
Ralph Wessel
Mentor
What happens when you change the ratio? If the bounding box doesn't change, does that mean the drawing is cropped when it expands or sits far within the bounding box when it contracts?

If so, there is a flag (isCutWithFrame) to indicate the drawing is cropped to the bounds – unsetting that might make the bounds automatically adjust. Alternatively, you might need to specify the bounds by defining the bounding polygon (poly + polygon memo).
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
What happens when you change the ratio? If the bounding box doesn't change, does that mean the drawing is cropped when it expands or sits far within the bounding box when it contracts?

If so, there is a flag (isCutWithFrame) to indicate the drawing is cropped to the bounds – unsetting that might make the bounds automatically adjust. Alternatively, you might need to specify the bounds by defining the bounding polygon (poly + polygon memo).
First question - yes

Changing ratio only works when first setting iscutwithframe as true and then false (doing ACAPI element change twice, first time with iscutwithframe=true and then iscutwithframe=false)
Anonymous
Not applicable
smithclarkson01 wrote:
Does changing the scaling ratio work?

it doesn't


Yep. Anyone knows how to do that please?
Anonymous
Not applicable
Does anyone have an idea? My goal is to do the “update” action of layouts/drawings by code, or to change drawing bounds.

Thanks in advance!
Anonymous
Not applicable
I was also unable to change element.drawing.bounds. It just didn’t change..
Anonymous
Not applicable
Tomer1 wrote:
Does anyone have an idea? My goal is to do the “update” action of layouts/drawings by code, or to change drawing bounds.

Thanks in advance!
So I found the ApiDB_CheckDrawingStatuisID. Is there a function that’s actually changing the status (updating the drawing instead of just checking if it’s updated)?