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

Problem: how to snap to custom made object

Anonymous
Not applicable
Hi,
for the first time I have tried to make my own objects but I encountered a problem.

The thing is I want to stack the objects next to each other but I can´t snap to the right places, only to the black spots and they are placed way outside the actual object.
Is there someway I can control where these snap points are placed?

The object is not very complicated, just simple surfaces in a space truss construction.

/Sara
6 REPLIES 6
Barry Kelly
Moderator
You will need to add a few ... HOTSPOT2 x, y ... to your 2D script.
Wher x & y are the co-ordinates of the points you want to be able to snap to.

The same can be done in 3D with ... HOTSPOT x, y, z

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
rocorona
Booster
There are many ways. You did not mention if the hotspot you are talking about are in 2D or 3D, nor if you scripted the object in GDL, or just saved it from the 3D window.

As you appears a bit lost, I suspect you are not familiar with the GDL commands, so for you can be a bit hard to add the correct HOTSPOT statements, to get the black nodes where you need them.
here a workaround... (you need to re-create the object from the original 3D elements)

-- Use some very simple object to "mark" the places where you want the hotspot. For example you can use the "Sphere" object from the standard library.
-- Save the whole object, including the spheres.
-- Open the new object (File/Library and Objects/Open Object)
-- Go to the 3D script (using the buttons on the left)
-- Browse the text, and search for the lines starting with CALL "Sphere" ...
-- Replace the whole command with
HOTSPOT 0,0,0, unid: unid=unid+1

-- Remember that the CALL command is NOT just one line. I can't check right now, but you need to delete all the lines ending with a comma (,)
-- You have to replace all the CALL "sphere" commands with the HOTSPOT commands, one for each sphere object you placed.
-- Save the object and check... if you are lucky it will work as you expect.


Maybe I am been not so clear in my explanation... ask if you need more detailed instructions.
_________________

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
Anonymous
Not applicable
Thank you for the answers, I will try them out later today.
You were quite right, I am a beginner at this, so I made the object in the 3D window. Scripting is unknown territory for me, but I think I will try the sphere-thing, doesn´t seem too hard...

Thanks again!
/Sara
rocorona
Booster
Sara wrote:
Thank you for the answers, I will try them out later today.
You were quite right, I am a beginner at this, so I made the object in the 3D window. Scripting is unknown territory for me, but I think I will try the sphere-thing, doesn´t seem too hard...

Thanks again!
/Sara
For the 2D symbol, simply edit the drawing deleting the "sphere" lines and adding the Hotspot from the ArchiCAD toolbar, where you need them.

To get rid of the 4 far hotspots (+ the center one) automatically placed by the program, hit the "Details" button on top of the editing main window (click on "Parameters", if you don't see it) and deselect the "Boundary hotspots" option.
_________________

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
Anonymous
Not applicable
Everything worked out great!

Thank you again for the quick answers, now I won´t miss my deadline because of this...

/Sara
Anonymous
Not applicable
Sara

Are you talking about stacking things in 3D or placing next to each other on plan? If it's just 2D, read on...

I know nothing about GDL scripting so the pro's might correct me here, but if I create an object from elements in the 3D window, I just open the object and physically add hotspots with the hotspot tool in the 2D Symbol window.

HTH