The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Gergely Feher

User avatar
By Riiiiv
Hi all,

I'm creating objects by using ArchiCAD tools, I can create the shape but there's many unnecessary hotspots when I select object. I don't know how to delete / hide them ?
Delete hotspot in 3D.jpg
Open resulting object..and look inside 3d script for HOTSPOT commands.
Comment one with placing "!" in the beginning of a line to disable.
Check what happened. Maybe not easily (not knowing GDL) but You can find the unnecessary ones and disable them.

Best Regards,
User avatar
By Juha Vesen

I think you can comment/erase all the unwanted 3d hotspots as
suggested, but there must be at least one hotspot present to
make the object choosable in 3d.

Also uncheck the parameter named 'Show 2d hotspots in 3d'

HTH, Juha
User avatar
By Erich
Juha Vesen wrote:Also uncheck the parameter named 'Show 2d hotspots in 3d'
Keep in mind that turning on/off this parameter will not affect already placed instances of the object. To see the affect, you will either need to place a new instance or unhide the parameter (deselect the X in the parameter table) so that you can change the setting in already placed instances.
User avatar
By Francois_MCD
Good day to you all
I am trying to find out how to add hotspots to an object?
With ArchiCad 16's improved Object saving interface it is easier than before to save custom objetcs, but the resulting hotspots only sits on the bounding box and in the center of the object base.
This does not help much with accurate object placement.
How can I add custom hotspots quickly just make the placement process easier & controllable?
Any help will be appreciated.
User avatar
By Eric Bobrow
Francois wrote to me for assistance on his question (posted recently in this thread) about how to get custom hotspots in ArchiCAD 16 when you create a new custom object, rather than just the automatic ones on the bounding box.

This is very easy to accomplish when you know how.

1) Place hotspots onto the floor plan in the places you'd like to be able to use for accurate placement
2) Select the hotspots along with the elements that you want to save as an object.
3) File menu > Libraries and Objects > Save Selection as Object.

It will have those hotspots embedded into the 2D symbol.

Initially it will also have hotspots at the bounding box and center, as well. You can turn these off if you wish:

1) Place the object you have created onto the plan.
2) Select the object, then go to the File menu > Libraries and Objects > Open Object.
3) Click Details > Compatibility Options and turn off "Hotspots on bounding box"

NOTE: Step 3 (Details > Compatibility Options) is different in AC16 than in earlier versions of ArchiCAD; it used to be that you would click the Details button in the main Parameters section to get to this control setting.

Re the unwanted 3D hotspots, these likely come from the scripts of the original objects that were used to create the new custom object. I think that unfortunately the only way to delete these unwanted hotspots will be to hunt them down in the 3D script, as suggested by others earlier in this thread.

User avatar
By rocorona
Eric Bobrow wrote:
Re the unwanted 3D hotspots, these likely come from the scripts of the original objects that were used to create the new custom object. I think that unfortunately the only way to delete these unwanted hotspots will be to hunt them down in the 3D script, as suggested by others earlier in this thread.


Remember you can get rid of them all in an easy way, using the "Find and replace" command in the Edit menu.
Search for "HOTSPOT" in the 3D script and replace it with "! HOTSPOT"
User avatar
By Francois_MCD
Gr8! thanks Eric
Your tip does give me a quick & easy way to add extra snap points for plan placement. This will help a great deal already.

I am still sitting with the need to add hotspots elsewhere on the object.
Just using a simple chair to test & illustrate (see Plan & 3D View image)
> A = Design / Start model
> B = Saved Object with no extra hotspots on plan view
> C = Saved Object WITH extra hotspots on plan view

I will appreciate Any more clever tips for this.
Insert Custom 3D Hotspots in new Objects.jpg
Save Custom Library Object - Plan & 3D View
User avatar
By rocorona
For the extra hotspots in 3D I think you have to switch them off in the 3D WINDOW SETTINGS (menu View>3D View Options).

To manually add new hotspots there should be an easier way, for the GDL Beginners... it is non difficult, usually, but one must have a minimum programming knowledge.

I can suggest a convolute way, that can be useful for someone.
1) add 4 new parameters (in the parameters page) and name them hsx, hsy, hsz and hss.
Give to "hss" a positive value (this is a "scale" factor for the new elements, that you can vary to suit the size of your object). Give a non-zero value to "hsz" too.
2) copy the following text at the very beginning of the 3D Script
Code: Select all
!___________________________________ Hotspot Helper 
HOTSPOT hsx,   0, 0, 1001, hsy, 1+128 
HOTSPOT hsx, hsy, 0, 1002, hsy, 2 
HOTSPOT hsx,  -1, 0, 1003, hsy, 3 
HOTSPOT   0, hsy, 0, 1004, hsx, 1+128 
HOTSPOT hsx, hsy, 0, 1005, hsx, 2 
HOTSPOT  -1, hsy, 0, 1006, hsx, 3 
HOTSPOT hsx, hsy, 0,   1007, hsz, 1+128 
HOTSPOT hsx, hsy, hsz, 1008, hsz, 2 
HOTSPOT hsx, hsy, -1,  1009, hsz, 3 
ADD hsx, hsy, 0 
LIN_ 0,-hss,0, 0,hss,0 
LIN_ -hss,0,0, hss,0,0 
LIN_ 0,0,0, 0,0,hsz 
FOR f = 1 to 4 
LIN_ -hss/2,0,hsz-hss/2, hss/2, 0, hsz+hss/2 
ROTz 90 
ADDz hsz  
DEFINE STYLE "hst" arial, hss*1000, 4, 0 
SET STYLE "hst" 
TEXT hss*.1, 0, " x= "+str(hsx,4,3) 
ADDy -hss*1.2 
TEXT hss*.1, 0, " y= "+str(hsy,4,3) 
ADDy -hss*1.2 
TEXT hss*.1, 0, " z= "+str(hsz,4,3) 
DEL 8 
!_____________________________ end Hotspot helper 

3) save the object, but do not close it.

Place the object and, in the 3D window, you can notice a special "mark" that is in the origin (0,0,0 coordinates) of the object. Be aware that the origin CAN BE very far from your elements, depending on the way the object was originally created.

The "mark" has a text tied to it, with the current coordinates (x=0.0, y=0.0, z=0.0), and two editable hotspot (one for the x-y position and one for the Z position). Drag the mark and it will tell the coordinates for a HOTSPOT command you can add in the script.

Switch to the object window (Windows menu) and write the command, in this form:
HOTSPOT 0.352, 1.120, 0.845, 501
where the first 3 numbers are the x, y, z, coordinates, and the forth is a unique identifier. Use any number you want. You can start from 1 and go to 2, 3... if you are sure these are not already used in the same script. To be more sure it can be safer to start with a higher number.

Now... if you try this process you will discover an (obvious) oddity.
... you don't have snaps for the mark, on the object's elements. This is very bad, but is the ORIGINAL reason for us needing these hotspots!
The way I suggest to deal to this problem is: place TWO copies of the object, perfectly overlapping. Select one of them and use the "Convert selection to Morph" command, in the context menu. Eventually you can lock the morph. Now you can use the object and his "mark" as described, with full cursor snap facility.

At the end when you are satisfied with the added Hotspots, delete the script sniplet and save the object.
User avatar
By rocorona
In addition, putting these instructions in the Master Script page, you can have the complete command ready to be copied -- from the selected object setting window to the 3d script.
EDIT:for this you need a new parameter called "hst", of text type
Code: Select all
Temp1 = STR(INT(hsx),1,0)+"."+STR((hsx-INT(hsx))*100000,1,0)+"000000"
Temp2 = STR(INT(hsy),1,0)+"."+STR((hsy-INT(hsy))*100000,1,0)+"000000"
Temp3 = STR(INT(hsz),1,0)+"."+STR((hsz-INT(hsz))*100000,1,0)+"000000"
Temp4 = STRSUB(Temp1,1,8)+", "+STRSUB(Temp2,1,8)+", "+STRSUB(Temp3,1,8)
IDnum = INT((hsx+.001)*500*(hsy+.001)*500+hsz*5000)
Temp5= "HOTSPOT "+ Temp4+", "+STR(IDnum,1,0)


UI_DIALOG "HOTSPOT command to be copied"
UI_INFIELD "hst", 0,40,400,40
Last edited by rocorona on Tue Nov 06, 2012 9:24 pm, edited 1 time in total.