.NET

Reply
Mentor
Posts: 244
Registered: ‎03-11-2008
Message 1 of 7 (237 Views)
Accepted Solution

Making a layer from xref current

237 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.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,481
Registered: ‎06-29-2007
Message 2 of 7 (197 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
Posts: 244
Registered: ‎03-11-2008
Message 3 of 7 (177 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: 8,481
Registered: ‎06-29-2007
Message 4 of 7 (175 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
Posts: 244
Registered: ‎03-11-2008
Message 5 of 7 (172 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
Posts: 244
Registered: ‎03-11-2008
Message 6 of 7 (166 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: 8,481
Registered: ‎06-29-2007
Message 7 of 7 (164 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
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community