DWG Unit is always "Unitless"
Moderators: SDS, support, admin
DWG Unit is always "Unitless"
Hi,
I'm using CAD .NET 10.2 and to parse DWG files. I need to obtain the unit used. In AutoCAD the unit is set to Inches, however, after the file is loaded the DWGImage.Converter.HeadStruct.InsUnits property is set to Unitless. I saw the following post:
http://cadsofttools.com/forum/viewtopic ... nit#p12679
but it does not work in my case.
Thanks,
Latchezar
I'm using CAD .NET 10.2 and to parse DWG files. I need to obtain the unit used. In AutoCAD the unit is set to Inches, however, after the file is loaded the DWGImage.Converter.HeadStruct.InsUnits property is set to Unitless. I saw the following post:
http://cadsofttools.com/forum/viewtopic ... nit#p12679
but it does not work in my case.
Thanks,
Latchezar
Re: DWG Unit is always "Unitless"
Hello Latchezar,
Could you check what value of a Block unit setting is displayed in a Block Definition dialog box when a DWG file is opened in AutoCAD? For example:

Mikhail
Could you check what value of a Block unit setting is displayed in a Block Definition dialog box when a DWG file is opened in AutoCAD? For example:

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: DWG Unit is always "Unitless"
Hi Mikhail,
Yes - all block units are set Inches. However, when I access the Converter.HeadStruct.InsUnits property of a particular block the value is set to "Unitless". In addition the "Converter" instance is the same for all blocks and the drawing itself even though each block can have a different unit.
The AutoCAD version used is 2013.
Thanks,
Latchezar
Yes - all block units are set Inches. However, when I access the Converter.HeadStruct.InsUnits property of a particular block the value is set to "Unitless". In addition the "Converter" instance is the same for all blocks and the drawing itself even though each block can have a different unit.
The AutoCAD version used is 2013.
Thanks,
Latchezar
Re: DWG Unit is always "Unitless"
Hello Latchezar,
Mikhail
CADBlock.Converter contains a reference to CADImage.Converter which is the same for all objects in a drawing, so each block will have units specified by a CADImage.Converter.HeadStruct.InsUnits property. Actually, the CADImage.Converter.HeadStruct.InsUnits contains a value of INSUNITS variable that is saved in the drawing file. You may try to save a DWG file to the DXF format, open the DXF file in Notepad and search for $INSUNITS entry. INSUNITS variable value goes after a 70 group code.In addition the "Converter" instance is the same for all blocks and the drawing itself even though each block can have a different unit.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support