I have a DXF file of a drawing drawn using AutoCAD. In that DXF file I want only main drawing. I don't want outer layouts and tables. How to identify data of main drawing in the complete DXF file?
From AutoCAD HELP:
Hi,
>> I want only main drawing. I don't want outer layouts and tables. <<
if i understand you right ... you can delete all unwanted objects ( Erase command ) and just keep your main drawing elements . then by SAVE AS command you can make your Dxf or Dwg file types.
Regards,
Imad Habash
Hi,
I guess we all know that you can edit a DXF-file with notepad++
But can you define what "main drawing" (from your first post) should be?
This drawing has all entities in the modelspace, the layouts don't contain objects.
The drawing itself is not well structured ... all was created on layer 0, the title-border is not a block, so your Notepad++ only sees a lot of splines, polylines, lines, arcs, dimension, all on layer 0 and some colors are used ... so how should Notepad++ know that one line is a model line and the other line belongs to the title-block?
Get back to the guy who created that drawing and ask for a well structured drawing, this one you attached is the absolute opposite of how a drawing should be created in AutoCAD.
- alfred -
I fully support Alfred's answer.
We differentiate between objects presenting the model of the objects such as drawing frame and title block
If you mean that: No chance to determine this automatically in this file.
For this isolated case (we do not know the many other files), would it be possible to delete all yellow objects (groupcode 62 = 2).
Or if the dimensioning is important: Delete all yellow objects (groupcode 62 = 2) which are NOT of type DIMENSION. (groupcode 0 = "DIMENSION")
Then you lost only 14 unimportant objects which drawed to make six dimension-objects "well" displaying.
Note: A perfect DWG/DXF File structure is:
1) Modeldata draw in scale 1:1 in Modelspace,
2) Layoutdata like frame and titleblock into paperspace(Layouts)
3) Display modelobjects in the scale in counts you want within layout-viewports.
Sebastian
Hi Alfred,
you just want to edit a dxf file with notepad? Have fun with that.
Just open the DXF file in AutoCAD. After editing the file save again as a dxf file.
Regards Jürgen
Hi,
>> you just want to edit a dxf file with notepad?
Look to post 4 from the thread opener, it looks like he need to find the entities without AutoCAD. As he mentioned "I hope you know that DXF file can be opened in a simple text viewer" that was just my answer to assume Notepad++ as the editor.
>> Have fun with that.
Well, most funny is to be able to repair defect DXF's using Notepad++ (or other editors) when AutoCAD can not open the DXF 😉
- alfred -
Hi Alfred,
Ok, I didn'T read it exactly.
Without AutoCAD or another CAD program it's almost impossible.
How can you select all the object which are not in the frame? You can try it only with the geometry points. Have fun.
Regards Jürgen
I completely agree with your answer. But if the person who will do the drawing does not know about what you told, then some of the objects like lines will appear in the ENTITIES section of the DXF file. But I want only the data of the main drawing which means the actual component drawing in the DXF file which is in the text format. Also, I have attached a screenshot with this reply. It consists of a layout of which some of the lines data is appearing in entities section. Please tell me that this way of doing drawing is correct or not.
-Vinay
I completely agree with your answer. But if the person who will do the drawing does not know about what you told, then some of the objects like lines will appear in the ENTITIES section of the DXF file. But I want only the data of the main drawing which means the actual component drawing in the DXF file which is in the text format. Also, I have attached a DXF file with this reply. It consists of a layout of which some of the lines data is appearing in entities section. Please tell me that this way of doing drawing is correct or not.
-Vinay
In this file everything is stored in the model area and we still do not know 100% what you want.
Please answer my questions:
a) Do you NOT want the frame and the title block in the model / Entity-Section?
b) Why do not you remove it yourself with a CAD program?
c) In what way do you want to remove it, with which program? By hand or with programming?
d) Why is this desired, what is the goal?
There is no technical difference in the file between a line representing the title block and a line representing your part,
So you can not technically distinguish what a component is and what a frame or title block.
If you do not want the frame and the title block,
then the creator must take care of it.
For this he has to know his software and the export function, we do not know the software? and therefore can not help.
I'm sure the helpers here know "everything", but you can not explain your concern well enough at the time.
We want to help, but we need more information.
"Please tell me that this way of doing drawing is correct or not. "
There is no right or wrong. Whether something is right or wrong depends on what you want (and why) and we do not know that yet.
Sebastian
Hi,
you are so right.
Regards Jürgen
Hi,
I am with @cadffm ... the answers to his questions are important to continue with the thread here (and hopefully give valid suggestions)
From your post
>> But if the person who will do the drawing does not know about what you told
That's problem one. Peoples not trained in anything do a lot of things wrong, because they don't know all the stuff.
This person should get a training, especially for structuring a drawing (at least using layers and blocks with attributes) ... after that you simply remove one block and you get only the inner part (your sheet metal views, which I guess you want to have a result, even not knowing why/what for you need that 2D views)
>> It consists of a layout of which some of the lines data is appearing in entities section
Using the wording of AutoCAD, then no, these DXF files do not have valid layouts, they only have the default layouts (layout1 and layout2) with each having a default viewport. A valid layout has one or more viewports, in most cases viewports are set to a specific scale, the layout has a border and a title-block and maybe some textual information like legend and some descriptions.
>> Please tell me that this way of doing drawing is correct or not.
I guess the above statements made clear that "NO, this is not how a well structured should be created".
The second DXF is better than the first one as it has some layers, and it has some blocks, but again most on layer 0.
And as long as the lines from the border can't be recognized as "border" you can't get them selected and erased. If you would erase all lines from layer 0 you would also erase lines within the shaft.
- alfred -
Thank you for your response. Actually why I want this kind of information is I am developing a software for CNC machine. There, If I input a DXF file to the machine it should display the drawing of the DXF file. So I don't want layout data, heading data and other unnecessary data. I want only main drawing's data.
Also I have one more question. If I have a DXF file where it consists of 3 views of a component like front view, top view and side view can I distinguish the views based on the data generated in the DXF file which will be in the text format. If so, it will be very helpful so that I can get the data of the required view only. I have attached a DXF file for this question which consists of different views.
-Vinay
Thank you for your response. Actually why I want this kind of information is I am developing a software for CNC machine. There, If I input a DXF file to the machine it should display the drawing of the DXF file. So I don't want layout data, heading data and other unnecessary data. I want only main drawing's data.
Also I have one more question. If I have a DXF file where it consists of 3 views of a component like front view, top view and side view can I distinguish the views based on the data generated in the DXF file which will be in the text format. If so, it will be very helpful so that I can get the data of the required view only. I have attached a DXF file for this question which consists of different views.
-Vinay
Hi,
>> I am developing a software for CNC machine
From that part you need a 3D object, you can't create any CNC code from the 2D views. Nothing in that drawing is 3D.
And in case you can work with 2D:
>> it will be very helpful so that I can get the data of the required view only.
Again, the structure of the lines in the DXF don't give you any information which view is the top one, which one left and so on. Either you need to have something like AI to analyze the data or you need to teach the creator of the drawings to work more structured.
Sorry, - alfred -
Can't find what you're looking for? Ask the community or share your knowledge.