Jump to content
Developer Wiki and Function Reference Links ×

Find out object properties


Recommended Posts

  • Vectorworks, Inc Employee

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!

Link to comment
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
Link to comment

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
Link to comment

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.

×
×
  • Create New...