Jump to content
Developer Wiki and Function Reference Links ×

Newbie - delete layer


Recommended Posts

Apologies for asking really simple question. All I want to do is use a script to delete a named layer which I can then have aa a drop down menu by adding to the workspace. This makes it much easier to invoke from an external macro tool such as Keyboard Maestro. Can anyone advise?

I am not technically minded and have been going round in circles. This is on 11.5 - yes I know it is ancient but still earning us money.

Many thanks

Michael

Link to comment

Take this with a huge grain of salt?

It seems like this should be a 1 liner. And it seems like this should work:

DelObject(GetLayerByName('NameOfLayer'));

I don't have a machine that I can run 11.5 on, but I tried it on 2009.

It "deletes" the layer but the layer still shows up in the navigation palette but not the Organization dialog box. (Did 11.5 have a Nav Palette?)

Maybe someone else will have an idea. Test this one carefully!

hth

mk

Link to comment

Never mind a grain of salt - brilliant! I have been poncing around for hours as I cannot get my head round the syntax. Now I can process 600+ files which have to be out in the next few days.

No worries, a) I have back -ups and working of copies anyway, and b) I just have to output eps files but making sure correct layer is showing - far easier to batch macro to delete layers and then select show active before exporting.

Can run macro now and go to bed :)

Cheers

Michael

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...