cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

GDL
About building parametric objects with GDL.
SOLVED!

Is there a way to specify which 2D the object preview shows?

jackjackjackjack
Participant

I'm making an object that acts like a stamp. It's our alternative way to using acrobat's pdf stamps. Anyways I've come across an issue where I can preview the object in the object setting since it only works in layout/publisher. 

 

In the screenshot it only shows what it will look like when the user places the object in 2D plan. The actual object only appears in layout. How do I make the 2D preview show layout instead?

 

image.png

The object shows up when the user places it then opens object settings.  

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

@jackjackjackjack wrote:

The object shows up when the user places it then opens object settings.  


That is because it does not do what it needs to do until you place it on a layout.

Until then it has no idea what it needs to display.

 

The best you can do is take a screen image of what it look s like when on a layout, and paste that into the 'Picture Preview' window in the GDL editor.

Then the preview image of the object will at least show what it will look like.

 

BarryKelly_0-1688023727996.png

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

View solution in original post

4 REPLIES 4
Solution
Barry Kelly
Moderator

@jackjackjackjack wrote:

The object shows up when the user places it then opens object settings.  


That is because it does not do what it needs to do until you place it on a layout.

Until then it has no idea what it needs to display.

 

The best you can do is take a screen image of what it look s like when on a layout, and paste that into the 'Picture Preview' window in the GDL editor.

Then the preview image of the object will at least show what it will look like.

 

BarryKelly_0-1688023727996.png

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
Lingwisyer
Guru

If your object has various ways to display, it might sometimes be a good idea to make an image that shows those variations.

Lingwisyer_0-1688024323982.png

 

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

Thanks barry,

I was hoping to avoid the picture preview and somehow point 2d preview to layout instead.

I think this has forced my hand

runxel
Legend

There is a very easy solution. Since you already test for GLOB_VIEW_TYPE (= 8 == Layout), just amend that IF loop with GLOB_PREVIEW_MODE = 1.

Then you'll see the layout stuff in the preview.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

«Furthermore, I consider that Carth... yearly releases must be destroyed»