Jump to content
Developer Wiki and Function Reference Links Read more... ×
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

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

 

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.

×