Jump to content
Sign in to follow this  
Patrick Winkler


Recommended Posts

I could not find a command to delete a layer - also tried vs.DelObj.

Can some one help me.

layer_name = 'Trash'
h = vs.GetObject (layer_name)

if h != vs.Handle(0):
print (h)
vs.DelObject (h)

Share this post

Link to post

That script will work, but only under the condition that the layer you are trying to delete isn't your active layer. Also, you won't necessarily see the changes in the navigation palette until you go to another document. (If you check the Organization window, the layer will no longer exist.)

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.

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.

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.

  • Create New...