Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

remove xdata from layer zero

6 REPLIES 6
Reply
Message 1 of 7
TherealJD
544 Views, 6 Replies

remove xdata from layer zero

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

6 REPLIES 6
Message 2 of 7
Alfred.NESWADBA
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 ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 7
TherealJD
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

Message 4 of 7
Alfred.NESWADBA
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 ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 7
Jason.Piercey
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"))

 

Message 6 of 7

Hi Jason,

 

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

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 7


@Alfred.NESWADBA wrote:

Hi Jason,

 

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

 

- alfred -


Yes, from the application CADTools as the example showed.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost