PDA

View Full Version : Set a layer's plot style and description



brendan.j.mallon
2009-10-30, 02:28 AM
I'm trying to create a layer and in addition to the usual suspects (Colour, Linetype, Lineweight), I'm also trying to set a Plot Style and a Description.

I'm all fine for the colour, linetype and lineweight, but the PlotStyleName setting generates an "eNoDatabase" error and the Description doesn't error, but doesn't do anything either.

I've attached my code in LayerTools.txt. Can anyone suggest what I'm missing?

I'm using Visual Studio 2008, I've hooked up the acdbmgd.dll and acmgd.dll files from ObjectARX 2010, and I'm running it in AutoCAD 2010 (just to state the obvious), although I've generated the same thing in AutoCAD 2009 (by referencing the relevant dll's of course).

Kerry Brown
2009-10-30, 09:03 PM
Have a look at post #15 and #22 mainly ... but the whole thread is worth reading

http://www.theswamp.org/index.php?topic=21588.0

brendan.j.mallon
2009-11-03, 12:32 AM
Thanks Kerry, that was genius.

Mind you, all that code for the sake of setting a plot style, when it took one line in VBA to do the same.

Oh well.... Welcome to the new world order.

Mind you, it helps keep the mystery doesn't it!!!

Make it too simple and anyone could do it.