![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Autodesk Software (Autocad, Inventor etc) Discuss Autodesk Software (Autocad, Inventor etc) software here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Looking for input on a dxf file... I think Ger21 is an Autocad user?? I am trying to help a user with an import problem. I believe a file has been presented with a mismatch in the units specified in a dxf.. I will preface this with I expect you understand that dxf file is unit independant and then units are specified within the format... Therefore, everything is drawn as a "UNIT" and goes from there.. One must no the unit for this answer. Here is a file attached. I believe that the originating natural unit in the file, is something other than the $INSUNITS =4 specified, which is causing a scaling on import... I have found some discussion of others regarding how to determine what the native, drawn unit is versus the INSUNIT variable, but couldnt find any definitive method from other autocad users. My question is do you know how to determine in AutoCad the 2 unit values and if they match??? (The actual drawn unit and the insunit value) I'm pretty sure it is a mismatch because during import, I can set my system units to a custom value of 1 unit = 25.4 units and everything comes in ok with no scaling.. The file is supposed to be mm (The set insunits value) but when being brought in to a metric system, the geometry is scaled... So my contention is that the native, drawn unit is inch and an INSUNITS value of MM has been applied. (Drawing started and performed in inches and changed for export. The dxf file I believe was created with qcad, which uses the dxflib to create the files, but was hoping that something in Autocad can make this determination, or that maybe you knew the dxf format enough in a text editor, that you could determine the actual entity's unit to be mismatched with the insunits #4 setting.. Any help is appreciated. Burr |
|
#2
| ||||
| ||||
| I looked through the .dxf reference manual, and here's what I see. $INSUNITS is used when inserting a block or other object into a drawing (in AutoCAD). It shouldn't be used to determine the drawings units, as that's not what it's for. I just spent about 30 minutes researching this, and I don't see anything in the .dxf file that specifically states the units used. I just realized that there really is no unit setting in AutoCAD. You can only set the units for inserted objects ($INSUNITS). I had previously mistakenly believed that this was a unit setting, but never read the description closely enough to actually understand what it is. There is a setting to determine imperial or metric, but it's not unit specific. $MEASUREMENT 0 = imperial 1 = metric AutoCAD let's you specify the type of units, but not the actual units. Types are: Architectural Decimal Fraction Scientific Engineering I've used a .dxf to machine code program in the past that would automatically assume mm's if entities wer larger than a specified size. But this was for large woodworking machines, where you could say that any size over 200 was automatically mm's. Imo, when a .dxf is imported, no scaling should ever be applied. Things would be much simpler. Unfortunately, scaling is pretty common it seems, and it usually causes problems. Does this help?
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| |||||
| |||||
| A little more info, as I may not have answered any questions.
![]()
So it's possible that it scales based on this variable. To know for sure what's going on, I'd need to spend a few hours testing.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| |||
| |||
| Hi Ger, Thanks for the response.. It does answer at least what i was looking for.. It kindof confirms it, but not definitivly.. Yes, autocad draws unit independent. 1 unit is one unit... though it has flags for unit input... The info I found was that you can start an autocad file in a "unit of measure" to begin work. Like imperial or metric. Then you can "set the units" with the INSUNITS. This doesnt scale the entities, just flags 1 unit is now 25.4 if the drawing was begun (or nativley created) in inches.. A dxf file is a unit independent format also, with the flags mentioned... The measure flag would be indicating that the drawing was of a unit system, then flags for inserts for other inputs, like when working in inches, you can just type the unit at input and draw with different units.. (Working in inches, you can type "20mm" and the units will be drawn accordingly... This is the INSUNITS flag on entities) I can produce predictable results by assumming the file was a native inch unit with the INSUNITS flag applied, hence the scaling issue for the user. Thanks for your help with the file. Dont spend too much time on the file. I just dont have autocad or advanced autocad UI knowledge and was hoping that you knew of some sort of report on the files info, that would present this data somehow.... |
|
#5
| ||||
| ||||
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
| Sponsored Links |
|
#6
| |||
| |||
| I am interpreting it as this... If I open package with something like an imperial template, or units measure is set to inches, then I add some type of entity, by typing in 3M or 3MM, or also, now change the drawing units to mm, then the insunits is applied to that area (Allowing several units to be entered for drawing in a single file, like "1 Mile, then one meter, then 2 inches). The originating UNITs value of entry is still at a scale of the drawing, but the insunits scales individual inserts with different values appropriately.. Hence multi unit entry in a single file. Thanks for the help. I do know what is set in the file.. I just needed someone competent in Autocad to help me determine if the system can specify the mismatch (Or better said, the original intent unit, vs the INSUNITS variable) This just needs to be known and follow the file, or a determination needs to be made using a predictable method.. Easy enough in this file.. The originating unit is 1 unit = 1 inch with a scale of 25.4 applied. All results are predictably pointing to this. Thanks again. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |