.NET

Reply
Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 1 of 7 (305 Views)
Accepted Solution

Making a layer from xref current

305 Views, 6 Replies
03-27-2013 08:24 AM

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.

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 -

*Expert Elite*
Alfred.NESWADBA
Posts: 9,070
Registered: ‎06-29-2007
Message 2 of 7 (265 Views)

Re: Making a layer from xref current

03-31-2013 02:39 PM in reply to: matus.brlit

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
-------------------------------------------------------------------------
Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 3 of 7 (245 Views)

Re: Making a layer from xref current

04-02-2013 12:25 AM in reply to: Alfred.NESWADBA

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.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,070
Registered: ‎06-29-2007
Message 4 of 7 (243 Views)

Re: Making a layer from xref current

04-02-2013 12:31 AM in reply to: matus.brlit

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
-------------------------------------------------------------------------
Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 5 of 7 (240 Views)

Re: Making a layer from xref current

04-02-2013 12:37 AM in reply to: Alfred.NESWADBA

Thanks, I will try that.

Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 6 of 7 (234 Views)

Re: Making a layer from xref current

04-02-2013 01:22 AM in reply to: Alfred.NESWADBA

works great, solution accepted

 

Thanks again

*Expert Elite*
Alfred.NESWADBA
Posts: 9,070
Registered: ‎06-29-2007
Message 7 of 7 (232 Views)

Re: Making a layer from xref current

04-02-2013 01:23 AM in reply to: matus.brlit

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

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.