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

Working with Paper / Model Space

derekjackson
Expert
Hi,
I'm trying to generate an object that lets the user choose between Paper or Model space when defining the size of the object output. It's an informative object that gives them a reading on various aspects of the model - I'd like to give them choice to choose its size in Model space for the working model, but also to pick a paper size so that it can be placed on layouts.

Obviously model space works fine - just treat it as any other architectural element.

For the paper space / layout option, I'm taking the output size chosen by the user (sz), and multiplying it by 1/scale, but it doesn't give the correct output.
sz = sz*(1/A_)
Am I using it correctly? Do I need to be using some sort of 'Layout Scale' variable instead?

It's probably really obvious but I'm stumped on this one...
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
6 REPLIES 6
vistasp
Advisor
Does this work?
sz = sz*(1000/A_)
= v i s t a s p =
bT Square Peg
https://archicadstuff.blogspot.com
https://www.btsquarepeg.com
| AC 9-27 INT | Win11 | Ryzen 5700 | 32 GB | RTX 3050 |
derekjackson
Expert
Ah - it seems my issue was that I was testing the thing on a layout, which meant it had passed through two different scales - no wonder things were confused.

It now seems to work fine (with sz=sz*A_ in the end)

Thanks anyway!
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
derekjackson
Expert
One more query on this topic.

I'm trying to get Graphical Hotspots to work so that the output can be dragged to a location by the user, and it will maintain a consistent relationship with the main object regardless of paper or model space.

For my readout I currently have a graphical hotspot definition, then an ADD2 to move the origin to the hotpspot, and output the reading:
    hsid=hsid+1
    HOTSPOT2 0,texty,    hsid,textx,1+128
    hsid=hsid+1
    HOTSPOT2 textx,texty,    hsid,textx,2
    hsid=hsid+1
    HOTSPOT2 -1,texty,    hsid,textx,3
    
    hsid=hsid+1
    HOTSPOT2 textx,0,    hsid,texty,1+128
    hsid=hsid+1
    HOTSPOT2 textx,texty,    hsid,texty,2
    hsid=hsid+1
    HOTSPOT2 textx,-1,    hsid,texty,3

    ADD2 textx, texty
For the paper space version, I have:
    textxs = textx*A_
    textys = texty*A_

    hsid=hsid+1
    HOTSPOT2 0,textys,    hsid,textxs,1+128
    hsid=hsid+1
    HOTSPOT2 textxs,textys,    hsid,textxs,2
    hsid=hsid+1
    HOTSPOT2 -1,textys,    hsid,textxs,3
    
    hsid=hsid+1
    HOTSPOT2 textxs,0,    hsid,textys,1+128
    hsid=hsid+1
    HOTSPOT2 textxs,textys,    hsid,textys,2
    hsid=hsid+1
    HOTSPOT2 textxs,-1,    hsid,textys,3

    ADD2 textxs,textys

Although my elements (the object and font size) keep a consistent size regardless of scale, the distance between them keeps fluctuating. Any ideas where my hotspot script is going wrong? All help appreciated!

Thanks,

Derek
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
Anonymous
Not applicable
derekjackson wrote:
I'm trying to get Graphical Hotspots to work so that the output can be dragged to a location by the user, and it will maintain a consistent relationship with the main object regardless of paper or model space.
I'm not clear exactly what you are trying to do but in my experience it is very difficult (if not impossible) to make dynamic hotspots responsive to both model and paper dimensions. It seems to be pretty much an either/or situation, at least practically speaking.
Erika Epstein
Booster
Derek,
Would you mind sharing with us what kind of an object you are making?
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Ralph Wessel
Mentor
derekjackson wrote:
I'm trying to generate an object that lets the user choose between Paper or Model space when defining the size of the object output. It's an informative object that gives them a reading on various aspects of the model - I'd like to give them choice to choose its size in Model space for the working model, but also to pick a paper size so that it can be placed on layouts.
This is straight-forward if you have a clear picture of the whole task. Your aim is for the object to appear on a printed page at a specified size irrespective of scale, e.g. if I say that text is 3mm high, it will always be 3mm high on the printed page.

To achieve this, you need 2 parameters to represent a single measurement - one for the size in paper space (pSize) and the other in model space (mSize).
  • - If the mSize parameter is not being edited, the Master Script should set mSize = pSize * scale

    - If the mSize parameter is stretched, then the Parameter Script should set pSize = mSize / scale

    - Always draw the object with mSize, and set the stretchable hotspots against mSize
Ralph Wessel BArch
Software Engineer Speckle Systems