Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Possible to "Refresh" glob_scale?

JGoode
Advocate
Hi,

I have an object in which in the 3D script I use
ADD x*glob_scale, y*glob_scale, 0
However, glob_scale seems to be set to 1:100 scale when using the object so I think the *glob_scale is just *100. Is there any way to make my object work so when the scale is 1:10 my add is only 10 times rather than 100 or whatever scale I want it set at.
ArchiCAD 23

Windows 10
8 REPLIES 8
Erwin Edel
Rockstar
glob_scale should work for current window scale, as far as I know, just do not use it in parameter script as I recall, as that doesn't allways run when changing view settings.

I haven't used it in a long time, though, maybe things have changed.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
JGoode
Advocate
Erwin wrote:
glob_scale should work for current window scale, as far as I know, just do not use it in parameter script as I recall, as that doesn't allways run when changing view settings.

I haven't used it in a long time, though, maybe things have changed.
It doesn't seem to take it into consideration when the scale is anything other than 1:100. Even if I place a new object. I feel like it should just work, but it doesn't so I'm puzzled. I also tried using a mul command on a block, same think happens, goes to *100 and doesn't budge at all. Very frustrating.
ArchiCAD 23

Windows 10
Erwin Edel
Rockstar
If I look at something like a scale sensitive skylight, they have IF...THEN routines setup where it checks current scale as a number. They write it in all caps, maybe it is case sensitive?
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
JGoode
Advocate
Erwin wrote:
If I look at something like a scale sensitive skylight, they have IF...THEN routines setup where it checks current scale as a number. They write it in all caps, maybe it is case sensitive?
Still not working it's not case sensitive. I even made another parameters to read glob_scale and it still didn't work. I have no idea. Are there issues with using glob_scale in the 3D Script?
ArchiCAD 23

Windows 10
JGoode
Advocate
Here is a snippet of the code:
if (symbol = sym1) then
	ADD 0.006211396909279*glob_scale, -0.006*glob_scale, 0
	HOTSPOT 0, 0, 0
	HOTSPOT 0, 0, height_3d
	ADDz height_3d+0.25
	material mat_avoid
	Sphere 0.25
	DEL 2
endif

if (symbol = sym2) then
	ADD 0.006211396909279*glob_scale, -0.006000007437933*glob_scale, 0
	HOTSPOT 0, 0, height_3d
	ADDz height_3d+0.25
	material mat_take
	Sphere 0.25
	DEL 2
endif

if (symbol = sym3) then
	ADD 0.0062*glob_scale, -0.006050007437933*glob_scale, 0
	HOTSPOT 0, 0, height_3d
	ADDz height_3d+0.25
	material mat_info 
	Sphere 0.25
	DEL 2
endif

if (symbol = sym4) then
	ADD 0.007*glob_scale, -0.0079222985750379*glob_scale, 0
	HOTSPOT 0, 0, height_3d
	ADDz height_3d+0.25	
	material mat_hazard 
	Sphere 0.25
	DEL 1
endif
if I use PROJECT2 3, 270, 2 in the 2D script, it shows my 3D in the exact place I want it to be but when I look in 3D view, it's in the wrong place (as if it is *100). I've attached an image.
ArchiCAD 23

Windows 10
JGoode
Advocate
Found out what it is anyway, no idea how to actually solve it though. Plan and 3D have separate scales so the 3D obviously wasn't reading the Plan scale. Is there any way for my object to read the 2D glob_scale? or do they have to be separate?
ArchiCAD 23

Windows 10
Erwin Edel
Rockstar
As far as I know, it works for current view and 3D is a view, so you'll have to save the camera as a view and set up scale.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
JGoode
Advocate
Erwin wrote:
As far as I know, it works for current view and 3D is a view, so you'll have to save the camera as a view and set up scale.
I thought it might work if I create another parameter based on global scale (e.g scale=glob_scale) just to get the value to then multiply by but that didn't seem to work. Any idea as to why this doesn't work or if there is a way to get what I am trying to do to work?

Thanks
ArchiCAD 23

Windows 10