I want to make a layer from external reference current.
I tried to identify it with its full name, but I got an error: eInvalidInput. So I found out, I have to use only the part behind the pipe.But then there is a problem, because this name is not unique withing the drawing.
Any number of xrefs can have such layer and also the drawing itself can have a layer with the same name.
How exactly can I set a layer from xref current?
example:
layer from xref1: Xref1|LayerName1
layer from xref2: Xref2|LayerName1
layer from the drawing: LayerName1
Thanks for advice.
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
I guess you want something that is not possible for AutoCAD. Have you tried it in the layer manager to make a layer current that's origin is within an external database? I get that message when I try to do that:
Whatfor is it necessary to your tool/your application to try to do that? If you want to draw on that layer you will have to create the objects in another database (in the Db from your XRef, and not in the Db of your drawing you have opened in the drawing editor). Maybe there will that some people come up with ideas if you describe your needs!
- alfred -
What I wanted is to select the layer in LayerManager according to the picked entity. So the user doesn't have to search all the layer for the right one. And the he can alter the properties of the selected layer.
I don't need it to be set current, but I need it to be selected in LayerManager and this was the way to do it for non-xref layers.
Hi
maybe you create a temporary layerfilter and make this active before starting the layermanager? So only this single layer is listet (matches to the filter)?
- alfred -
Thanks for the feedback, great to know that it works for you! - alfred -
Can't find what you're looking for? Ask the community or share your knowledge.