The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki

By Tomer1
#300881
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.
By Tomer1
#300909
Ralph Wessel wrote:
Thu Aug 22, 2019 9:33 am
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.
#300912
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).
By Tomer1
#300914
Ralph Wessel wrote:
Thu Aug 22, 2019 2:20 pm
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)
By Tomer1
#303433
Tomer1 wrote:
Mon Oct 07, 2019 10:52 pm
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)?