cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Autoscaling 2D lines, circles, etc...

Anonymous
Not applicable
I use the following code to autoscale lines and circles that make up the 2d part of my object.
I drew it @ 1/8" scale so that's why I had to use /96 in the code.

MUL2 GLOB_SCALE/96,GLOB_SCALE/96 !Autoscaling

My question is when it scales itself. the object moves in plan. It moves just a little bit 11/16" from 1/8" scale to 1/4" scale. Here's some of the code:

MUL2 GLOB_SCALE/96,GLOB_SCALE/96 !Autoscaling
PEN cpen
LINE2 0'-0.0000", 0'-2.0157"+1.375", 1'-9.6614", 0'-2.0157"+1.375"
LINE2 0'-0.0000", -0'-2.0157"+1.375", 1'-9.6614", -0'-2.0157"+1.375"
CIRCLE2 1'-4.0079", 0'-0.0000"+1.375", 0'-6.0000"
DEL 1
HOTSPOT2 0,+1.375",0
HOTSPOT2 1'-4.0079",+1.375",0

DEFINE STYLE STYLE_1 "Arial", 35 * MIN (a, b), 7, 0

The code starts the object @ the center, where I want it to scale from. But it seems to be scaling the object from some other point. Is it because I drew the object @ 1/8" scale to begin with????

Thanks for any ideas,
Michele
4 REPLIES 4
TomWaltz
Participant
How is the object moving in plan? I placed a few hotspots and could not find any movement.

Is there a reason you placed the HOTSPOT2 statements outside the MUL/DEL statements? Is this all the code? Namely, are there any ADD2 statements around?

I'm not sure it's related, but I make it a point to always draw scale sensitive objects at 1:1 scale.

I tried adding a HOTSPOT2 at 0,0, and it is definitely off-center.
Tom Waltz
TomWaltz
Participant
It's right here:
Michele wrote:
LINE2 0'-0.0000", 0'-2.0157"+1.375", 1'-9.6614", 0'-2.0157"+1.375"
LINE2 0'-0.0000", -0'-2.0157"+1.375", 1'-9.6614", -0'-2.0157"+1.375"
in a coordinate system,
2" + 1.375" = 3.375"
-2" + 1.375" = -0.625"

Since it is not centered on 0 to begin with, object is skewing when it scales.
Tom Waltz
Anonymous
Not applicable
Thanks,
I made a copy of the object and was cleaning it up and I think I got it workng correctly. I always seem to see it clearer after I send an email for help.

Thanks,
Michele
Anonymous
Not applicable
Michele,
I copied your code into a new library part and noticed what Tom did.
Your object is not centered on the origin (0,0) and the del is before
the hotspots.

An easy fix.


MUL2 GLOB_SCALE/96,GLOB_SCALE/96 !Autoscaling
add2 0,-1.375"
PEN cpen
LINE2 0'-0.0000", 0'-2.0157"+1.375", 1'-9.6614", 0'-2.0157"+1.375"
LINE2 0'-0.0000", -0'-2.0157"+1.375", 1'-9.6614", -0'-2.0157"+1.375"
CIRCLE2 1'-4.0079", 0'-0.0000"+1.375", 0'-6.0000"
!!!DEL 1
HOTSPOT2 0,+1.375",0
HOTSPOT2 1'-4.0079",+1.375",0
DEL 2

Peter Devlin