DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Keep Original Scale Ratio

Started by aqua, April 03, 2010, 09:17:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aqua

Designcad 13.13

Does anyone know any code to check/adjust the

"Keep Original Scale Ratio" setting when loading images.

I have a macro that has load image code - and I want to make sure via code that the "Keep Original Scale Ratio" setting is checked

>LoadBMP
{
  }

Regards Frank

Lar

In my experience a bitmap always loads at the correct aspect ratio, no matter how you move the mouse. It's only after it's loaded that you can change the aspect ratio. I don't know if it's the same when loading with a macro but just test it to see.

Lar

Bob P

If only one point is set, that's the lower left corner of the graphic.  If two points are set, the points define the lower left and the upper right extents.  I couldn't find any way to proportionally scale the graphic without knowing its pixel size already.

aqua

Designcad 13.13

Re: Keep Original Scale Ratio

Lar, is does NOT always load with the correct aspect ratio. There is a "Keep Original Scale Ratio" Dialog Box running along the top when I load an image. If this is Unchecked, it does NOT load with the correct aspect ratio. If it is Checked, it will load with the correct aspect ratio. Does not matter if part of macro or via using the menu. I want to be able to ensure that this is Checked. (i.e. have the tick in it)

Bob P. I don not want to scale it, that is done next in the macro, via code that asks them to set 2 points on the screen, then enter the distance. It is the initial loading of the image that I want to ensure the "Keep Original Scale Ratio" Dialog Box is Checked.

When it is unchecked, it keeps this setting in the memory some-where - not sure if it is in an ini file or a windows memory.

Regards Frank

Lar

I guess the key factor here is 13.13, not 17, 18, 19 or 20, all of which (I can easily check and) lack the aspect ratio option so they only load bitmaps proportionately.

Lar

Dr PR

One thing to remember - when bitmaps are imported they are "scaled" relative to the current zoom level. To demonstrate this import an image, zoom in/out and then import the same image again. They will not be the same size. They will not have the same "pixel density" relative to a drawing unit.

If you want to import several bitmaps and have them come in at the same pixel density, do not change the zoom level until all are imported.

When I am doing this manually I first draw a reference line on a blank layer. Then I disable all other layers and use "View/Fit to Window" (CTRL W) to zoom to a repeatable zoom level. This reference layer is then locked and hidden (after moving to a new layer).

Then I import images. If I change the zoom level and then want to import another image I make the reference layer the active layer, disable all other layers, and "Fit to Window" again. This puts me back at the original zoom level for importing another bitmap.
DesignCAD user since 1987