.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Making a layer from xref current

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
matus.brlit
1739 Views, 6 Replies

Making a layer from xref current

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.

6 REPLIES 6
Message 2 of 7

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:

 

2013-03-31 23-36-00.png

 

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 7

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.

Message 4 of 7

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 7

Thanks, I will try that.

Message 6 of 7

works great, solution accepted

 

Thanks again

Message 7 of 7

Thanks for the feedback, great to know that it works for you! - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost