Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
TherealJD
Posts: 414
Registered: ‎10-03-2008
Message 1 of 7 (319 Views)

remove xdata from layer zero

319 Views, 6 Replies
08-14-2012 07:53 AM

i have a drawing that i know has xdata attached to layer zero. the problem is, it's not an object i can find. Does anyone have a routine to remove xdata from ALL objects. like a global remove xdata?

 

Thanks for any help!

 

Jd...

*Expert Elite*
Alfred.NESWADBA
Posts: 8,867
Registered: ‎06-29-2007
Message 2 of 7 (317 Views)

Re: remove xdata from layer zero

08-14-2012 08:04 AM in reply to: TherealJD

Hi,

 

what makes the problem having XData on layer 0?

Can you upload this drawing?

 

- alfred -

 

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
TherealJD
Posts: 414
Registered: ‎10-03-2008
Message 3 of 7 (304 Views)

Re: remove xdata from layer zero

08-14-2012 02:29 PM in reply to: Alfred.NESWADBA

There's data on layer zero that's embedding unit information in the file. (english, vs metric) it came from a custom app, and i want a way to remove it! See attached file

*Expert Elite*
Alfred.NESWADBA
Posts: 8,867
Registered: ‎06-29-2007
Message 4 of 7 (296 Views)

Re: remove xdata from layer zero

08-14-2012 04:09 PM in reply to: TherealJD

Hi,

 

reading the XData from layer "0" does not show any XData.

So how did you check that?

 

What I see is that this drawing was modified by Civil3D (library version 8.0). If you want to get rid of this additional data there are options, but depending on what version of AutoCAD and what vertical product (based on AutoCAD) you have.

_WBLOCK and selecting the entities in modelspace (as long as you don't select a Civil3D-object) is one option that should work with all AutoCAD's.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Mentor
Jason.Piercey
Posts: 1,101
Registered: ‎04-04-2001
Message 5 of 7 (272 Views)

Re: remove xdata from layer zero

08-15-2012 09:23 AM in reply to: TherealJD

TherealJD wrote:

There's data on layer zero that's embedding unit information in the file. (english, vs metric) it came from a custom app, and i want a way to remove it! See attached file


 

One way:

 

(defun strip_xdata (app ename / newid) 
 (setq newid (list (list -3 (list app))))
 (entmod (append (entget ename) newid))
)

(strip_xdata "CADTools" (tblobjname "layer" "0"))

 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,867
Registered: ‎06-29-2007
Message 6 of 7 (267 Views)

Re: remove xdata from layer zero

08-15-2012 09:58 AM in reply to: Jason.Piercey

Hi Jason,

 

have you really found xdata (EED) on Layer "0"?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Mentor
Jason.Piercey
Posts: 1,101
Registered: ‎04-04-2001
Message 7 of 7 (261 Views)

Re: remove xdata from layer zero

08-15-2012 11:00 AM in reply to: Alfred.NESWADBA

alfred.neswadba wrote:

Hi Jason,

 

have you really found xdata (EED) on Layer "0"?

 

- alfred -


Yes, from the application CADTools as the example showed.

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
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 to get help installing your software.

Ask the Community