Vectorworks, Inc Employee SBarrettWalker Posted November 1, 2017 Vectorworks, Inc Employee Share Posted November 1, 2017 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! Quote Link to comment
Pat Stanford Posted November 1, 2017 Share Posted November 1, 2017 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. 1 Quote Link to comment
Vectorworks, Inc Employee klinzey Posted November 1, 2017 Vectorworks, Inc Employee Share Posted November 1, 2017 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. 1 Quote Link to comment
twk Posted November 2, 2017 Share Posted November 2, 2017 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 1 Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted November 2, 2017 Author Vectorworks, Inc Employee Share Posted November 2, 2017 Thanks all! Quote Link to comment
Recommended Posts
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.