Jump to content

AutoCAD LT Remove XData from existing objects


Recommended Posts

Posted

I received a question from a company I do work for occasionally who just have a couple of LT seats. They get drawings from someone in which some of the objects have XData attached to them. They need to copy the objects and remove the XData from the copied objects, but they can't as they only have LT without Express Tools or the possibility to run a LISP or VBA routine. I don't mind helping them out on an occasional basis, but this could become regular.

 

Does anybody know of a way to remove XData in LT? I certainly don't.

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

  • Tyke

    16

  • Tuns

    7

  • ReMark

    4

  • steven-g

    4

Top Posters In This Topic

Posted Images

Posted
I received a question from a company I do work for occasionally who just have a couple of LT seats. They get drawings from someone in which some of the objects have XData attached to them. They need to copy the objects and remove the XData from the copied objects, but they can't as they only have LT without Express Tools or the possibility to run a LISP or VBA routine. I don't mind helping them out on an occasional basis, but this could become regular.

 

Does anybody know of a way to remove XData in LT? I certainly don't.

 

Taking a wild stab here, but will WBLOCK work? I know it is great for getting rid of a lot of unwanted information in quite a few cases.

Posted

I tried that out on a long polyline with a lot of XData. I issued the WBLOCK command and converted the polyline to a block and saved the block to a temp area, which can be later deleted, with an insertion point of 0,0,0. The block has no XData but after exploding the block to get the polyline back the polyline still had the XData attached to it.

Posted

Is there any XDATA in the DWG file made from the WBLOCK command? Or is it only up reinsertion to the original file?

 

I know there have been complaints with XDATA and duplication using some commands (mainly the OFFSET command) so the something similar may be happening when reinserting the block you created with the WBLOCK command and reinserted into the original file.

 

If that is the case, the WBLOCK on the entire drawing instead and use that instead of the original.

Posted

I have a really wild idea but someone else (the sometimes-client?) will have to test it.

 

Download and install the free CAD program called BabaCAD. Why? The author advertises it as the first free CAD program capable of running lisp routines. Then find a lisp routine that will remove XDATA (I've come across a couple myself) and test it.

Posted
Is there any XDATA in the DWG file made from the WBLOCK command? Or is it only up reinsertion to the original file?

 

I know there have been complaints with XDATA and duplication using some commands (mainly the OFFSET command) so the something similar may be happening when reinserting the block you created with the WBLOCK command and reinserted into the original file.

 

If that is the case, the WBLOCK on the entire drawing instead and use that instead of the original.

 

Yes the XData is still there. It is the offset command that raised the issue, they offset a polyline for the new object, but cannot have it having XData, which it does. They have to copy other objects such as blocks which cannot have any XData either. As WBLOCK preserves all of the XData it looks as it will be a non starter.

Posted
I have a really wild idea but someone else (the sometimes-client?) will have to test it.

 

Download and install the free CAD program called BabaCAD. Why? The author advertises it as the first free CAD program capable of running lisp routines. Then find a lisp routine that will remove XDATA (I've come across a couple myself) and test it.

 

I'm meeting the managing director of the company on Thursday of this week and I will mention your suggestion ReMark. But I don't really think it will be take it on. They have spent a huge amount of time over the last year or so developing their own customized Ribbon Tabs, Palettes and classical Tool-Bars that having to do that all over again would not really be an option for them. I've tried talking them into buying full AutoCAD, but they just shake their heads. I have my own VBA macro that strips off XData that they could have, but they need full AutoCAD or a clone that runs LISP or VBA.

Posted

All they'd have to do is use BabaCAD for lisp routines then AutoCAD for everything else. BabaCAD is so far from complete it's almost useless for anything but LISP routines IMO.

Posted

BabaCAD would only be used to strip out the XDATA. There would be one downside. Open, edit and save to the DWG file format supported by the AutoCAD clone will result in the following message when opened in AutoCAD.

 

NotAutoCADMessage.JPG

The workaround is to check off that little box at the bottom. I forgot about it until I saw the image enlarged.

Posted
All they'd have to do is use BabaCAD for lisp routines then AutoCAD for everything else. BabaCAD is so far from complete it's almost useless for anything but LISP routines IMO.

 

They are electrical engineers/planners who use CAD because they have to, but they don't want to. To try and convince them to adopt a further CAD program just for LISP is just not going to happen. Suggest to them that they need to offset the polyline (copy the block), save their drawing in AutoCAD, close it, re-open it in another CAD program, run a LISP routine to strip off the XData, save the drawing, close the drawing, re-open the drawing in AutoCAD and carry on. I don't really think that they would go for that. It would also not be an option to strip of the XData later all in one go, they would never remember which objects they needed to strip. These guys are not fit in AutoCAD because they don't want to be, they have no "drive to learn", does that ring a bell from another current thread? They want someone to come up with any easy answer for LT.

Posted

They get this message already ReMark, because the DWG that they originally get was created by an Intergraph GIS software.

Posted

Can you post a file so I can mess around with it to see if anything at all can be done?

Posted (edited)

Have a look at this Tuns. But if you are using LT how are you going to see the XData?

 

Intergraph uses font based symbols so you could well find that if you don't have the fonts installed you will only see alphanumerics where blocks should be. Also beware that the coordinate system uses huge coordinate values.

 

 

Test_XData.dwg

 

Also be sure to use a white background colour in model space, as they use real black text, which you would not see!

Edited by Tyke
added a comment
Posted

Yeah, I cant seem to be able to see the XData so I can't find a way to actually change it. Unless, I'm looking for the wrong thing that is. All the visible text on this file appears like normal text to me so I could be looking right at the XDATA and not even know it.

Posted
Yeah, I cant seem to be able to see the XData so I can't find a way to actually change it. Unless, I'm looking for the wrong thing that is. All the visible text on this file appears like normal text to me so I could be looking right at the XDATA and not even know it.

 

You can only see, edit, add or remove XData with an appropriate tool, AutoCAD does not provide one OOTB, it's in Express Tools, or you use a LISP, VBA or .NET tool, which LT can't. And that's the problem.

 

Did you ever install BabaCAD like ReMark suggested to you?

Posted

I think that was suggested for those engineers. I just wanted to see if there was anything I could have done on LT to see them.

Posted

So, playing around with the file for a few minutes and I was able to do something with it at least. I had exported the polylines as an IGES file (cdata is not exported with the objects with this format). From there I was able to explode the splines that were made from the polylines, using the Polyline Edit command (PE) I was able to use the multiple option to convert the back into polylines. Unfortunately no layer or block information was retained. There may be similar files types ou there where this works but I did't have time to look at all of them.

 

It could realistically be scripted to do a lot of that stuff for you so this is a start at the very least (although not very practical).

Posted

My $0.05 Intergraph is microstation and the compatibilty sometimes between the two is a problem. Autocad has blocks microstation cells and yes they are a alpha character naming convention. The best way to import the job is you must set up a translation table so dgn becomes a better DWG this may fix the problem of the xdata. The other thing is the GIS systems use SHP as their way of sharing and generally they have a lot of buried data attached.

 

As an example a contour will appear as a pline but it has xdata which is its current height. MAP has a number of functions to convert this sort of stuff to plain Autocad objects. This sounds like the objects in LT a external shp to DXF/DWG may be the way to go.

 

Maybe also save as far back as possible R14 may strip out the xdata.

Posted
My $0.05 Intergraph is microstation and the compatibilty sometimes between the two is a problem. Autocad has blocks microstation cells and yes they are a alpha character naming convention. The best way to import the job is you must set up a translation table so dgn becomes a better DWG this may fix the problem of the xdata. The other thing is the GIS systems use SHP as their way of sharing and generally they have a lot of buried data attached.

 

As an example a contour will appear as a pline but it has xdata which is its current height. MAP has a number of functions to convert this sort of stuff to plain Autocad objects. This sounds like the objects in LT a external shp to DXF/DWG may be the way to go.

 

Maybe also save as far back as possible R14 may strip out the xdata.

 

The Intergraph software is GNET which is used as a GIS for a electricity supplier, it also includes telecom, gas and topo. It is nothing like Microstation, which I have, and has a very limited CAD side to it.

 

The XData on the existing objects that were exported in DWG format must be retained the new objects must not have any XData. When you have a very long cable as a polyline, say 1+ km long with hundreds of segments, and a new cable needs to be drawn as an offset to this polyline then it would be great to use the offset command, but when that is done the offset polyline has all the XData of the original polyline. What is needed is a new offset polyline without XData. It would be possible to digitize the original polyline, offset the digitized polyline and then delete the digitized polyline. But there is a high probability that they will miss digitizing nodes in the original polyline and it is a very time consuming exercise. In full AutoCAD it is not a problem at all.

Posted

You can see the data if you dxfout and open the dxf file in a text editor, it would probably go against all the Autodesk rules, to delve in there and remove code using another program like Excel, VBA to read the data and remove references to xData, and save it without those lines of code, (which has a code of 1000 and above), so I won't mention it. :nono:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...