Macro controling on/off of layers

I am new to this macro writing and so do not know much, but I would like to be able to write a macro that control the on/off properties of layers based upon the custom properties of the configuration that is shown in the viewson the sheet.

SolidworksApi macros
Answers 8
DG
DG 2011-03-19 Best Answer
SM
SM 2011-03-20

Deepak,

Did you just creat these or do you have a source that you resort to

to get these macros.

SF
SF 2011-03-21

Deepak, at the end of the "Macro to turn off layer a, then turn off layer b" post you had mentioned a pop up box that asked you which ones. That is something that would work in my situation. I have 4 different layers and each layer has the product label with the correct information based upon that style of layer. What I wouldlike is the dialog box to open and check which style of label you want and turn on and have it turn that layer on while turning the rest off.


Thank you

DG
DG 2011-03-22

I'm learning so creating some of these macros myself but I do look at API help files and other sites having these macros.

DG
DG 2011-03-22

I'm almost done with the macro, just doing some testing.I'll post it tonight.

DG
DG 2011-03-22

Try this (I have included one sample drawing too). The only issue with the macro is that it hides behind so you need to press Alt + Tab  to find it

SF
SF 2011-03-29

Thanks this works for what I am looking for.

DG
DG 2011-03-29

Here is the fixed one (no issue with form going on back)

Layer On Off (Set Current) V1