Jump to content
sbarrett

Find out object properties

Recommended Posts

Hello all, is there an easy way to find out if an object is a 2D or 3D object? I feel like there has to be some sort or properties call but I am not aware of it. I need a way to filter objects in a script by whether they are 2D or 3D, but all I can think to do is filter by object type, and that seems way too involved.

 

Thanks!

Share this post


Link to post
Quote

2D - 3D Status

  

  

  

Object Setting

Selector

Setting Value

Function

Object Is 3D

650

TRUE or FALSE (read-only)

GetObjectVariableBoolean

Object Is 2D

651

TRUE or FALSE (read-only)

GetObjectVariableBoolean

 

The Vectorscript Appendix is your friend. ;-)

 

Quote

Planar Object Is Screen Object

1160

TRUE or FALSE

ObjectVariableBoolean

This one might help also.

  • Like 1

Share this post


Link to post

I think I remember trying 650/651 and found it to be unreliable and possibly view dependent. I finally resorted to checking the object type.

  • Like 1

Share this post


Link to post

I use all of those above including checking object types..

 

python:

    def is_3Dobj(handle_to_object):

        type3D = [24, 25, 34, 38, 40, 68, 71, 81, 83, 84, 89, 95, 111, 113, 86]

        if vs.GetTypeN(handle_to_object) in type3D:
            return True
        elif vs.GetTypeN(handle_to_object) == 15:
            symtype = vs.GetSymbolType(handle_to_object)
            if symtype != 0:
                return True
            else:
                return False
        else:
            return False

 

  • Like 1

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

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.

×
×
  • Create New...