Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to identify the drawing's outer layouts in DXF file?

17 REPLIES 17
Reply
Message 1 of 18
Anonymous
1985 Views, 17 Replies

How to identify the drawing's outer layouts in DXF file?

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?

17 REPLIES 17
Message 2 of 18
pendean
in reply to: Anonymous

From AutoCAD HELP:

 

To Export Selected Objects to a DXF File

  1. Click File menu Save As.
  2. In the Save Drawing As dialog box, click Tools Options.
  3. In the Saveas Options dialog box, click the DXF Options tab.
  4. Choose Select objects.
  5. Click OK.
  6. In the Save Drawing As dialog box, in the Files of type box, select a DXF format.
  7. Select a folder and enter a file name.
  8. Click Save.
  9. Select the objects to export and press Enter.
Message 3 of 18
imadHabash
in reply to: Anonymous

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

EESignature

Message 4 of 18
Anonymous
in reply to: pendean

Thank you for your reply...But I wanted to know which are the objects that
have been used for outer layouts in DXF file which will be in text format.
I hope you know that DXF file can be opened in a simple text viewer also
like notepad. There main drawing's data will be in ENTITIES section. But
the problem is data of the outer layout also is displaying in ENTITIES
section. How to identify which one is main drawing's data and which one is
outer layout's data?
Message 5 of 18
Alfred.NESWADBA
in reply to: Anonymous

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 6 of 18
cadffm
in reply to: Anonymous

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

EESignature

Message 7 of 18

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

I hope my tip helps. If so then give me kudos and mark the tip as a solution.
Thanks.

Jürgen A. Becker
Building Services

Development and Support
Autodesk Forge Spezialist


CAD-Becker.de
https://www.CAD-Becker.de

Message 8 of 18

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 9 of 18

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 hope my tip helps. If so then give me kudos and mark the tip as a solution.
Thanks.

Jürgen A. Becker
Building Services

Development and Support
Autodesk Forge Spezialist


CAD-Becker.de
https://www.CAD-Becker.de

Message 10 of 18
Anonymous
in reply to: cadffm

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

Message 11 of 18
Anonymous
in reply to: Alfred.NESWADBA

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

Message 12 of 18
cadffm
in reply to: Anonymous

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

EESignature

Message 13 of 18
Juergen_Becker
in reply to: cadffm

Hi,

you are so right.

Regards Jürgen

I hope my tip helps. If so then give me kudos and mark the tip as a solution.
Thanks.

Jürgen A. Becker
Building Services

Development and Support
Autodesk Forge Spezialist


CAD-Becker.de
https://www.CAD-Becker.de

Message 14 of 18
Alfred.NESWADBA
in reply to: Anonymous

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 15 of 18
parkr4st
in reply to: Alfred.NESWADBA

Does the attached satisfy your needs ?

Message 16 of 18
Anonymous
in reply to: cadffm

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

 

 

Message 17 of 18
Anonymous
in reply to: Alfred.NESWADBA

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

Message 18 of 18
Alfred.NESWADBA
in reply to: Anonymous

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)

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

Post to forums  

Forma Design Contest


AutoCAD Beta