When trying set the PlotStyle of a Layer the PlotStyle needs to be used in the drawing. If the plotstyle is not used in the drawing you get a “Key not found” error. Doing a search of the internet didn’t result in an answer. I finally found an answer here: http://discussion.autodesk.com/forums/thread.jspa?threadID=113812&tstart=16455
It appears that while the layer cannot be assigned a plotstyle an object can. So the solution is to create a temporary object then apply the plotstyle. After the plotstyle has been applied the object can be deleted.
Using Resume at the end of the ErrHandler has the code go back to the line that the error happened at, Resume Next would have it go the next line of code after the error.
No comments:
Post a Comment