cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Starting August 6, 2024, TLS 1.2 will be the minimum required protocol version for Graphisoft products and services that require an online connection. Learn more…
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Second hotspot

Anonymous
Not applicable
Hi all,

I know that the simple code, (hotspot2 0,0) will place a hotspot at the point that I click my mouse. Is there a way to place a second hotspot at a point of my choice within the same script?

Thanks, Doug
7 REPLIES 7
Anonymous
Not applicable
I'm beginning to understand how this code works....

!_________________________moving it horizontally
hotspot2 0,verti,unID,horz,1+128 : unID=unID+1
hotspot2 -1,verti,unID,horz,3 : unID=unID+1
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1

!_________________________moving it vertically
hotspot2 horz,0,unID,verti,1+128 : unID=unID+1
hotspot2 horz,-1,unID,verti,3 : unID=unID+1
hotspot2 horz,verti,unID,verti,2+256 : unID=unID+1
hotspot2 horz/2,verti/2
line2 0,0,horz,verti

Someone posted it in another thread at some point and I thank them very much. I added the line2 to create a line between the hotspots. What I'd like to be able to do is

A: Draw the line by picking two points at the time I insert the object.
B: After placing the object, I'd like to be able to stretch the line using either of the hotspots instead of one of them being fixed at 0,0
C: Place other moveable hotspots on the same line.
Anonymous
Not applicable
Hello Doug,
I wish I understood what you are trying to do.
If you simply want to make a stretchable line
then try this code.

pen 10

hotspot2 0,0

hotspot2 a,b

pen 1

line2 0,0,a,b

Place the object using the fourth placement method from the left.
This will enable you to stretch the line to any length and angle.
Peter Devlin
Anonymous
Not applicable
Hi Peter,
Good to here from you again. Basically, I got it in my head that I could create my own stretchable dimension. Unfortunately I forgot to remember "KISS" ( keep it simple stupid) Actually I've never created a simple line object and it never entered my mind to try it in this case.(I have a tendency to do things the hard way but I'm trying to ease up on that!!) I used you're suggestion and found that the 3rd geometry method worked better for me because I only have to click twice(I'm lazy as well!!) I think I can put other lines and text into the script to make it look like a normal dimension using the formulas on the geometry reference sheet that I have hanging on the wall given to me by some kind gentleman! The next step will be to find a way to split a long wall dimension or add dimensions to a string using ctrl click(or maybe editable hotspots?) the way AC does to measure window and doors in a single string.
Anonymous
Not applicable
Hello Doug,
It is interesting that you are trying to make an object look like
a dimension line because I was just looking at an object I made
a long time ago which looks like a dimension line. I have forgotten
whey I made it and have never used it. You might be interested
in the code so I am uploading here.
Peter Devlin
Anonymous
Not applicable
Peter, is safe to assume that this was saved in a version later than AC9. That's what I have running at the moment and can't load it.
Anonymous
Not applicable
Hello Doug,
Here is the lib part saved in AC 8.1
Peter Devlin
Anonymous
Not applicable
Peter,
I got it to load and it's pretty neat. It's nice that people are willing to share their scripts so that others can use them to figure out how things work.

Thanks...Doug

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!