Jump to content

VBA - How can I hide all layers of an AutoCAD drawing?


Recommended Posts

Posted

Hi,

I'm making a macro in VBA for AutoCAD.

How can I hide all layers present in a drawing of AutoCAD?

There is an instuction, command or method? :?

 

And after that, how can I show a layer called "Pippo"?

 

Thanks,

Marc

Posted

If you have express tools installed you should look into the layiso and layunison commands. Also in autocad the layon and layoff commands

Posted

or layer2 tool bar, which can isolate layers or turn them off

 

so like

(carnt remember the coammand name)

(command "layeriso" "pippo" \)

Posted

this should point you in right direction

for each acadlayer in thisdrawing.layers
layer.freeze=true
next
layer.item('Pippo").freeze=false

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...