Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

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

remove xdata from layer zero

335 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,070
Registered: ‎06-29-2007
Message 2 of 7 (333 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 (320 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,070
Registered: ‎06-29-2007
Message 4 of 7 (312 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
-------------------------------------------------------------------------
Distinguished Mentor
Jason.Piercey
Posts: 1,183
Registered: ‎04-04-2001
Message 5 of 7 (288 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,070
Registered: ‎06-29-2007
Message 6 of 7 (283 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
-------------------------------------------------------------------------
Distinguished Mentor
Jason.Piercey
Posts: 1,183
Registered: ‎04-04-2001
Message 7 of 7 (277 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.

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.