Dwg units
Moderators: SDS, support, admin
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Dwg units
how can we know which unit is a DWG file we want to load?
Re: Dwg units
Hello,
The drawing units value is stored in the INSUNITS variable of a DWG/DXF file. In CAD VCL, you can read this value using TsgHeadVarStruct.InsUnits field:
For more information about INSUNITS variable values in AutoCAD, refer to the following article:
http://knowledge.autodesk.com/support/a ... 8-htm.html
Mikhail
The drawing units value is stored in the INSUNITS variable of a DWG/DXF file. In CAD VCL, you can read this value using TsgHeadVarStruct.InsUnits field:
Code: Select all
case Img.Converter.HeadVarStruct.InsUnits of
0: StatusBar1.Panels[0].Text := 'Drawing units: Unitless';
1: StatusBar1.Panels[0].Text := 'Drawing units: Inches';
4: StatusBar1.Panels[0].Text := 'Drawing units: Millimeters';
end;
http://knowledge.autodesk.com/support/a ... 8-htm.html
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Re: Dwg units
Img.Converter.HeadVarStruct.InsUnits allways is 0.
I have tried 20 different files (in milimeters, meters, etc) and each file was reported as "Unitless '.
The reporting code is on the Mouse Move event.
Why?
P.D.: I look on GetPHeadVarStruct procedure, on first read (open the file) the InsUnits value is correct but, later this is changed!!
Why?
I have tried 20 different files (in milimeters, meters, etc) and each file was reported as "Unitless '.
The reporting code is on the Mouse Move event.
Why?
P.D.: I look on GetPHeadVarStruct procedure, on first read (open the file) the InsUnits value is correct but, later this is changed!!
Why?
Re: Dwg units
Hello,
This is an issue that must be fixed. Note that this issue concerns only the DWG files, if you'll try to read INSUNITS value from a DXF file, TsgHeadVarStruct.InsUnits will return a correct value.
Mikhail
This is an issue that must be fixed. Note that this issue concerns only the DWG files, if you'll try to read INSUNITS value from a DXF file, TsgHeadVarStruct.InsUnits will return a correct value.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Re: Dwg units
I work with many DWG files, I need this fixed as soon as possible.
Thanks!!
Thanks!!
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Re: Dwg units
Again, what happens with your support, there is a serious problem and you do not comment on how and when it will be resolved or perhaps think that we should expect to pay for the license "number 20" to have the problem solved.
I need this solution now!!!!!!!
I need this solution now!!!!!!!
Re: Dwg units
Hello,
We've opened a case for this issue, but currently I can't tell when it will be resolved.
Mikhail
We've opened a case for this issue, but currently I can't tell when it will be resolved.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Re: Dwg units
Perhaps this can help:
What you need to read is a Flag data, before Insunits variable:
You have the handle:
DICTIONARY_LAYOUTS := R.H;
DICTIONARY_PLOTSETTINGS := R.H;
DICTIONARY_PLOTSTYLES := R.H;
and the flags:
Flags := R.BL;
CELWEIGHT := (Flags AND $001F);
ENDCAPS := (Flags AND $0060) shr 5;
JOINSTYLE := (Flags AND $0180) shr 7;
WDISPLAY := (Flags AND $0200) = 0;
XEDIT := (Flags AND $0400) = 0;
EXTNAMES := (Flags AND $0800) > 0;
PSTYLEMODE := (Flags AND $2000) > 0;
OLESTARTUP := (Flags AND $4000) > 0;
later the value we need so much:
INSUNITS := R.BS;
I hope that helps.
What you need to read is a Flag data, before Insunits variable:
You have the handle:
DICTIONARY_LAYOUTS := R.H;
DICTIONARY_PLOTSETTINGS := R.H;
DICTIONARY_PLOTSTYLES := R.H;
and the flags:
Flags := R.BL;
CELWEIGHT := (Flags AND $001F);
ENDCAPS := (Flags AND $0060) shr 5;
JOINSTYLE := (Flags AND $0180) shr 7;
WDISPLAY := (Flags AND $0200) = 0;
XEDIT := (Flags AND $0400) = 0;
EXTNAMES := (Flags AND $0800) > 0;
PSTYLEMODE := (Flags AND $2000) > 0;
OLESTARTUP := (Flags AND $4000) > 0;
later the value we need so much:
INSUNITS := R.BS;
I hope that helps.
Re: Dwg units
Hello,
Thank you for the information.
Please take into account that we plan to solve this issue in version 11 which is the latest one, because we provide free support within one major version and all the fixes are usually added to the current release.
Mikhail
Thank you for the information.
Please take into account that we plan to solve this issue in version 11 which is the latest one, because we provide free support within one major version and all the fixes are usually added to the current release.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 54
- Joined: 14 Mar 2015, 22:33
Re: Dwg units
At the same time you should remember that if you sell a defective product, under the license terms, you are obliged to repair the errors, at no cost, as the license has been paid. The problem does not refer to a new feature or new implementation, it refers to an error in the original code (paid), which legally is not subject to payment of a new license, but rather to repair by the seller of the product.
Each time a source code error are repaired, a repair must be implemented for the affected versions and not just for the new version.
Remember that in the past (more than a year ago), I have indicated several errors in your source code, which have never been solved, affecting the basis of the license agreement.
Each time a source code error are repaired, a repair must be implemented for the affected versions and not just for the new version.
Remember that in the past (more than a year ago), I have indicated several errors in your source code, which have never been solved, affecting the basis of the license agreement.