AutoCAD Mechanical Forum
Welcome to Autodesk’s AutoCAD Mechanical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Mechanical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set active layer group

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
FRFR1426
404 Views, 2 Replies

Set active layer group

I'm making an addin for ACM and I need to set the active layer group. The only way I've found is to use the -AMLAYERGROUP on the command line.

 

But unfortunately my layer group has a dot in its name. And  when I set it with the sequence:

 

-AMLAYERGROUP
_G
_S
BAT.A <-- My group name

ACM tells me that the group name is incorrect. If I use a group name without dot, it works. I've tried to escape the dot with a backslash or a backtick, but it does not work.

 

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: FRFR1426

*cough* You want the simplest solution?

Don't use that dot. 😛

You get to pick your names, but symbols like " . * / etc are not very flexible choices: you will get into situations where they don't work.

(Somone here at this company thought it was a good idea to name all the articles using a slash and the special ones with an added asterix 😞

Now i need to translate those away most of the time and back again after processing.)
Message 3 of 3
FRFR1426
in reply to: Anonymous

Thanks but it's not me which choose the name. It's my customer. I've found a simple solution. I use the system variable CLAYER to make current one of the layer of the group.

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost