Author |
Topic  |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 03 2025 : 23:31:56
|
I have a preloaded base image with Scale set - all good.
User loads a new base image and the user measures a section and provides the Relative New Size and we recalc the scale.
I want to change default (at runtime)
IEGlobalSettings().DefaultMeasureUnit:= ieuMeters; IEGlobalSettings().MeasureUnits[ieuMeters]:= '';
to
IEGlobalSettings().DefaultMeasureUnit:= ieuPixels; IEGlobalSettings().MeasureUnits[ieuPixels]:= '';
measure, then set new scale, then revert back to
IEGlobalSettings().DefaultMeasureUnit:= ieuMeters; IEGlobalSettings().MeasureUnits[ieuMeters]:= '';
NO Mtrs to Pixels takes place ? (stuck in Mtrs from startup).
Andy |
|
xequte
    
38875 Posts |
Posted - Mar 04 2025 : 14:13:18
|
Hi Andy
Setting DefaultMeasureUnit changes the measurement value that is shown to the user.
Can you explain what you mean by: "we recalc the scale"?
Do you mean the user measures again?
Nigel Xequte Software www.imageen.com
|
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 04 2025 : 18:21:18
|
Firstly, the Base Image is Loaded, IEGlobalSettings().DefaultMeasureUnit:= ieuMeters; and ImageEnView.SetScale are initialized in FormCreate.
Now at runtime a change from Meters to Pixels is required IEGlobalSettings().DefaultMeasureUnit:= ieuPixels; does not change - still stuck in Meters ???
User loads new base image replacing old base image with scale now incorrect so a new measure/scale is required.
At present we are stuck in Meters. Also drawing unit issues.
I want to be able at runtime to change drawing units. I see you allow for PosXD but not allow for PolyLine AddPoint(XD, YD ???
After image loaded and scale set I would like to draw in Meter Units eg. XD:= 1.030mtrs etc.
Andy |
 |
|
xequte
    
38875 Posts |
Posted - Mar 05 2025 : 21:56:05
|
Hi Andy
In the demo you sent me, you can click a button on the toolbar to enable measuring:
ImageEnView.MouseInteract := [miMeasureLength];
I added buttons for:
IEGlobalSettings().DefaultMeasureUnit:= ieuMeters; IEGlobalSettings().MeasureUnits[ieuMeters]:= 'M';
And:
IEGlobalSettings().DefaultMeasureUnit:= ieuPixels; IEGlobalSettings().MeasureUnits[ieuPixels]:= 'px';
If I click these buttons, and then the measure button, the measurement CORRECTLY changes to metres/pixels.
If that is not what you mean, please explain step by step.
Nigel Xequte Software www.imageen.com
|
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 05 2025 : 23:32:33
|
Above does not change on my version, I have requested latest version.
Andy |
 |
|
|
Topic  |
|