Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

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

remove xdata from layer zero

358 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: 9,403
Registered: ‎06-29-2007
Message 2 of 7 (356 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: 416
Registered: ‎10-03-2008
Message 3 of 7 (343 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: 9,403
Registered: ‎06-29-2007
Message 4 of 7 (335 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
-------------------------------------------------------------------------
*Pro
Jason.Piercey
Posts: 1,268
Registered: ‎04-04-2001
Message 5 of 7 (311 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: 9,403
Registered: ‎06-29-2007
Message 6 of 7 (306 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
-------------------------------------------------------------------------
*Pro
Jason.Piercey
Posts: 1,268
Registered: ‎04-04-2001
Message 7 of 7 (300 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!