We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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
Karl Ottenstein
Moderator
fabricfo wrote:
no scripts or parametric, just the drawings.
It requires some script - but a very small bit.

The GDL symbol window supports 16 'fragments', which are much like layers. You can place the (graphic) plan symbol in one fragment and the elevation symbol in another. The 2D script then queries what view it is in (plan or elevation) and displays the appropriate fragment.

You can see part of this (multiple views, each in a different fragment), but examinging the 2D Symbol window of any of the objects in the Vehicle Symbols 12 library folder, and turning on fragments 1, 2 or 3 (little square pushbuttons) in turn. For example, Car Elev 01 12 is shown here. It has a top, side, front and rear view, but is just a 2d symbol, not a model.

Someone else may have an example to share...

Cheers,
Karl
bmw-symbol.png
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
The symbol illustrated (and others in that folder) have a parameter to let the user choose which symbol (top, side, etc) should appear. In your case with the tree - top or side only - the choice could be automated in the script using the GLOB_CONTEXT global variable defined on page 227 of the GDL manual:
GDL wrote:
GLOB_CONTEXT context of appearance
1-library part editor, 2-floor plan, 3-3D view, 4-section/elevation, 5-settings dialog, 6-list, 7 - detail drawing, 8 - layout, 22 - editing feedback mode from the floor plan, 23 - editing
feedback mode from a 3Dview, 24 - editing feedback mode from a section/elevation, 28 - editing feedback mode from a layout, 43 - generating as an operator from a 3D view, 44 -
generating as an operator from a section/elevation, 46 - generating as an operator from a list
Then, the simple 2D script would be something like this:
if GLOB_CONTEXT=4 then ! show elev view in section or elevation
    fragment2 1, 1
else ! show plan symbol for all other views
    fragment2, 2, 1
endif
Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Thanks a lot Karl,
I will try to make it and them I put it here
Karl Ottenstein
Moderator
You're welcome... but I just noticed that you wanted to see the sketch in a 3D view also. To do that, you'll need a jpeg (etc) of it and use the parapicture object that Dwight talks about in various threads. He has uploaded it to the GDL Depository.

Cheers,
Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Hello,

You can open the 2D-DWG as an object;
Archive...-> Libraries & objects...-> Open object...

This creates an GDL-object where the DWG 2D-lines visible in the 3D-view too. The lines are
lying on the XY-plane, but with the "rotx 90"-command the drawing wireframe is rotated
vertical to the XZ-plane.

Hope this makes sense.

--
Regards, Juha
Karl Ottenstein
Moderator
Karl wrote:
You're welcome... but I just noticed that you wanted to see the sketch in a 3D view also. To do that, you'll need a jpeg (etc) of it and use the parapicture object that Dwight talks about in various threads. He has uploaded it to the GDL Depository.
Juha is right, and sorry for the 'senior moment' with the comment above where I forgot that the original drawing was a dwg and not a hand sketch. Duh.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
YESSSSSS Juha...

That exactly what I want...
The only thing is that in the elevation I need another dwg drawing... not the same.... is there a way to combine them??

Thanks
Anonymous
Not applicable
Hello,

As Karl suggested using the GLOB_CONTEXT variable it can be done automatically.

if GLOB_CONTEXT=4 then ! show elev view in section or elevation 

   !---> paste the 3D-view code here

else ! show plan symbol for all other views 

    !---> paste the other view code here

endif


--
Regards, Juha
Anonymous
Not applicable
We only had to wait for 3599 posts this to happen
Karl wrote:
sorry for the 'senior moment'
--
Regards, Juha