Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
hziak

Drawing Symbols

Recommended Posts

Hi,

I tried to create a 2d/3d Symbol and draw it.

The Symbol is created correctly and is shown in VW and i can drag it into the drawing.

But i trieded to draw it with PlaceSymbolN but it isn't shown in the drawing.

The object is definitly created and i can convert it into a nurbs obj that is shown afterwards.

What is going wrong?

thanks

h

Share this post


Link to post

Hi,

thanks for the hint but that would not work for me.

I am basicly trying to create an Object with the SDK that is represented in 2d, for example as Rectangle, and in 3D as 3D object without showing the 2D Part in the 3D view.

The problem is that everytime i create a 2D objekt it is also shown in 3D.

The only solution that i found was drawing a 2D/3D Symbole.

It seams to me that you have to put that Symbol into an VWObject.

But that didn't work out, the 2D objects are also shown in 3D.

Share this post


Link to post

hermann,

Yes, 2D objects will show in 3D views. You have 2 options, use a Hybrid Symbol or a Plug-In Object (PIO). A symbol is the easier way. A PIO is more flexible, but requires a bit more programming.

As you have found, 2D only symbols will show in both 2D and 3D. Only when a symbol has both 2D & 3D parts (Hybrid Symbol) will it show one or the other as the view changes. You shouldn't have to place this symbol inside a PIO to get the behavior you described. It should work just by placing it in the drawing.

Remember though, 2D objects that are created on the Layer Plane are really 3D objects and will show in 2D and 3D views. You will need to make sure your 2D objects are Screen Plane objects if you wish them to vanish in 3D views.

If you want to show a 2D part without a 3D part, you can put a 3D Locus in your Symbol, place it in a "HideMe" class and hide that class. This will create the 3D side of your hybrid symbol and keep it invisible.

???Locus3D(x, y, 0);

???SetClass(LNewObject, 'HideMe');

???HideClass('HideMe');

To keep the selection handles consistent in 2D & 3D views, place the Locus inside the Symbol's 2D boundary. Even when the 3D part is hidden, it will still show a selection handle when it is selected.

Raymond

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×