2025-09-15 02:23 PM
Hi! I need to figure out a way to make 2D drawings in the 3D view, in a way that the drawings are always facing the camera, preferably while rotating the camera too. My intention is to draw pins where the user clicked in the model. Here’s a mockup of what I mean:
Is it possible to do this in the current state of the API?
Solved! Go to Solution.
2025-10-21
01:13 PM
- last edited on
2025-10-21
02:55 PM
by
Laszlo Nagy
Hi Bruno,
You can also approach this billboard-like behaviour from the GDL side. You can find below a sample GDL script that turns a picture towards the perspective camera.
Best, Akos
dx= GLOB_EYEPOS_X - GLOB_TARGPOS_X
dy= GLOB_EYEPOS_Y - GLOB_TARGPOS_Y
rotx 90
if SYMB_MIRRORED then
roty SYMB_ROTANGLE
else
roty -SYMB_ROTANGLE
endif
if abs(GLOB_EYEPOS_X-GLOB_TARGPOS_X)<EPS then
if GLOB_EYEPOS_Y>GLOB_TARGPOS_Y then roty 180
else
alf=atn(abs(dy/dx))
if SYMB_MIRRORED then
if dx<0 and dy>0 then roty -(180-alf)
if dx<0 and dy<0 then roty -(180+alf)
if dx>0 and dy<0 then roty -(-alf)
if dx>0 and dy>0 then roty -(alf)
else
if dx<0 and dy>0 then roty (180-alf)
if dx<0 and dy<0 then roty (180+alf)
if dx>0 and dy<0 then roty (-alf)
if dx>0 and dy>0 then roty (alf)
endif
roty 90
endif
addx -ZZYZX/2*pictWidth/pictHeight
picture "picture", ZZYZX*pictWidth/pictHeight, ZZYZX, 1
del top
2025-10-16 05:23 PM
Hi Bruno,
The only thing I know of which comes close is the Notification Bubble introduced with AC29.
Not sure if you can do it without a timeout though to always show it and also updating it to camera rotation might be tricky.
I don't know of any other functionality to achieve this directly with only the Archicad API. You can get the clicked point though in screen coordinates of the 3D window like it's done in the notification bubble example. Then you could send this to an external program (written by yourself or maybe there are solutions available) to draw a pin there. It's for sure an experiment, but I assume it's possible.
Hope that helps,
Bernd
2025-10-21
01:13 PM
- last edited on
2025-10-21
02:55 PM
by
Laszlo Nagy
Hi Bruno,
You can also approach this billboard-like behaviour from the GDL side. You can find below a sample GDL script that turns a picture towards the perspective camera.
Best, Akos
dx= GLOB_EYEPOS_X - GLOB_TARGPOS_X
dy= GLOB_EYEPOS_Y - GLOB_TARGPOS_Y
rotx 90
if SYMB_MIRRORED then
roty SYMB_ROTANGLE
else
roty -SYMB_ROTANGLE
endif
if abs(GLOB_EYEPOS_X-GLOB_TARGPOS_X)<EPS then
if GLOB_EYEPOS_Y>GLOB_TARGPOS_Y then roty 180
else
alf=atn(abs(dy/dx))
if SYMB_MIRRORED then
if dx<0 and dy>0 then roty -(180-alf)
if dx<0 and dy<0 then roty -(180+alf)
if dx>0 and dy<0 then roty -(-alf)
if dx>0 and dy>0 then roty -(alf)
else
if dx<0 and dy>0 then roty (180-alf)
if dx<0 and dy<0 then roty (180+alf)
if dx>0 and dy<0 then roty (-alf)
if dx>0 and dy>0 then roty (alf)
endif
roty 90
endif
addx -ZZYZX/2*pictWidth/pictHeight
picture "picture", ZZYZX*pictWidth/pictHeight, ZZYZX, 1
del top
2026-02-26 01:50 PM
Interesting solution! Perhaps I could force a practical permanence by setting a large timeout (with Uint32 miliseconds I could set it to last 42 years hahahha), and maybe call the Show(Point3D) method whenever I detect the camera change. It's sad that it's only a AC29 feature, I would need from AC23 up to current, as demanded by my client. This problem is tied to an add-on demand from this client, but the project is paused. Once it returns, I'll definitely test this workaround. Thanks!
2026-02-26 01:51 PM
That's an interesting solution! And I see it working from AC23 up to current. As I said in my previous reply, once this project returns I'll definitely test this workaround. Thank you so much!
2026-02-26 06:46 PM
I think you could use the billboard people object(s), and just attach a custom image...
there are also out of the box third party solutions that may be better for what you are trying to accomplish. I can't remember which application a past firm used, but it was similar to the navigable realtor models; "click here to move camera position"