BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

Creating an object from 2d drawing

Anonymous
Not applicable
I wanna create an object using only their 2d representation from a dwg drawings.
when i use it in floor plan and 3d views it shows the 2d representation and when seeing from the cut and elevation view it show the elevation block.
no scripts or parametric, just the drawings.
I tried on the images of the gdl master but it is only the representation, not the block actually...
how can i do this??
Thanks guys !

archicadblock.JPG
20 REPLIES 20
Anonymous
Not applicable
Hi,
I did import the plan autocad drawing to the object master script parameters..
but the elevation drawing I couldn't...
How can I put it there in the elevation box?

I saw the cars object in the libray, but they are different from what I want..
You have to choose between the views ( top, elevation, back )..
and all the drawing are on the same 2d first box... I think that the time that this script must enter to see a different view on each .
Thanks
Karl Ottenstein
Moderator
Juha wrote:
We only had to wait for 3599 posts this to happen
Karl wrote:
sorry for the 'senior moment'
Kiitos, Juha... but you just haven't noticed all of my other ones [I edit some before anyone notices!].

Regards,
Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
derekjackson
Advocate
I seem to be having a similar problem to fabricfo.

I've created an object that has the following 2D script and nothing else:

HOTSPOT2 0,0

IF (GLOB_CONTEXT=4) THEN
	RECT2 0,0, 1, 1
ELSE
	CIRCLE2 0,0, 1
ENDIF
It sort of works, but not quite. When I place the object in plan, it draws a circle. When I place it elevation, it draws a rectangle. So far, so good.

However, if I place an object in plan, and then view it in elevation, it's blank - the object isn't there. Likewise, if I place the object in elevation, it doesn't appear in plan. I've tried rebuilding the view but no luck.

Any idea why this is? I found a semi-workaround where I just draw the circle in plan, but create the elevation in the 3D script window:

IF (GLOB_CONTEXT=4) THEN
	ROTx 90
	RECT 1,1
	DEL 1
ELSE
	!Draw 3D version of object
ENDIF
However, this limits me to using the 3D planar elements, so I lose full control over fills, can't draw lines, have to specify the symbol in three dimensions, etc.

Is there any way to do all the elevational work within the 2D script? I just can't seem to get it to work...

Thanks,

Derek
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Hi Derek,

You found the only solution for the task. It's not a workaround.

Sections and elevations are 3D based in ArchiCAD. This means that there is no possibility to script the section representation in 2D. Naturally, as a workaround, you can place 2D-based objects on the section view but then they are 2D 'patches' to the section - they won't be included in the VB model.
You've noticed all this already but I wanted to confirm that this is the full set of tools you have.

Best regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
derekjackson
Advocate
Thanks Zsolt, good to know. Is there at least a way of specifying fill and background pens on the 3D POLY_ element? It obviously takes its pen information from somewhere when drawn in 2D elevations...
derekjackson
Advocate
Okay, one problem with this solution. It works fine if the elevation is placed looking directly north or south, but any other angle and the object is seen skewed.

I've tried code to rotate the object to face the camera:
dkx = K~ - X~
dly = L~ - Y~
azi = ATN(dly/dkx)	!Azimuth	

ROTz (90 + azi - SYMB_ROTANGLE) !W~
This works fine for objects in 3D view, but when used in elevation, it rotates the object to face the last 3D camera position - not the current elevation angle.

Is there an equivalent GLOB variable for detecting angle of elevation / section? If not, it seems this method won't work either...
derekjackson
Advocate
I'm guessing no response means that there isn't a way!

Surprising, as the program must know the angle that the elevation line sits at to be able to calculate what is seen and what isn't.

If anyone knows a way of detecting section or elevation angle, please let me know... If not, any chance it could be added in as either a GLOB or REQUEST variable in a future release?!

I guess the only other solution for now is to create simple revolved forms that look like simplistic trees - these should then be fine from any angle of elevation.

Cheers for the help so far, anyway.
Anonymous
Not applicable
derekjackson wrote:
Is there an equivalent GLOB variable for detecting angle of elevation / section? ...
Unfortunately no... But you can vote here and cross your fingers.

Cheers,

Paulo
derekjackson
Advocate
Thanks. It's becoming quite a routine now that we come up with a great idea for an object, get 90% there, then discover a limitation of GDL that stops us finishing it...
Anonymous
Not applicable
derekjackson wrote:
It's becoming quite a routine now that we come up with a great idea for an object, get 90% there, then discover a limitation of GDL that stops us finishing it...
I've been there too... Thats why I strongly advice everyone to previously make an implementation plan before diving into script.
I used to hit this wall a lot of times before I have Andrew Watson's GDL Handbook.
It will give you precious hints on starting a personal/commercial GDL object.
Anyway... It seems that GS GDL team put this on the top priority for next releases... So you'll just have to put your object in standby for now.

Cheers,

Paulo
Learn and get certified!