FS#2385ScriptItems are inserted with the unit setting for a new drawing instead that of the target drawing
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Low
- Priority
- Low
- Reported version
- 3.27.6
- Operating system
- All
- Reported
- 2022-07-31 by CVH
- Closed
- 2022-08-17 by andrew
Tested on a Win7 32bit and a Win10 64bit system.
With App.Prefs defaults for new drawings set to mm, mm, metric.
Inserting a ‘CubeCuttingOut’ with the default size 10 into a drawing in inch results in size 0.39370079” what is indeed 10mm.
One would expect it to be sized 10 units of the target drawing.
Recently reported by Husky concerning the QCAD Utilities by MikeJ.
https://qcad.org/rsforum/viewtopic.php?f=30&t=9429&start=15#p38045
ScriptItems are first created on a new (offline) document.
QCAD will then adapt the size with unit conversion.
Then it will scale, rotate, flip according the 'Insert Script' tool options.
This is fully predictable for standard library items where the source is a dxf file with a defined unit and no unit conversion would occur if the library source unit was ‘None’.
I then assume that this can be fixed with setting the new RDocument in InsertScriptItem.prototype.beginEvent its unit to ‘None’.
Not knowing what the intended behavior should be for any other case, source or usage ...
Regards,
CVH
Comments (1)
Anderw,
The proposed fix is functional.
Please refer to:
https://qcad.org/rsforum/viewtopic.php?f=30&t=9466
Regards,
CVH