Unexpected scaling in VBA

Hi folks,

I've been working on putting some new work macros together (in VBA) and I've run into a strange issue that has me stumped.

We are implementing a new standard where we are to have a CAD drawing template and put a part on it and export it to PDF.

My macro copies the part from my original drawing (which is at 1:24 scale / 1/2" = 1') to the clipboard.

The script then opens a new document scaled 1:1 and imports the DXF drawing template and pastes the clipboard part into it.  At this point of course the pasted part is small because the scale doesn't carry with the paste, so the script then sizes the part up to 1:1 as well.

If the part is larger that the E-size drawing template I scale up the template so that the part fits.  All this goes well until the actual scaling.

In the case of a larger drawing I have the script calculate that I need to double the size of the template.  I set a Double variable to have a value of 2.

I then grab the size of the drawing template into two doubles using (typed from memory):

dScale = 2

dTempW = drawingBorder.sizeWidth * dScale

dTempH = drawingBorder.sizeHeight * dScale

I then set the size:

drawingBorder.sizeWidth = dTempW

drawingBorder.sizeHeight = dTempH

I've dropped a couple msgboxes in there to report the size, and this is where I get confused.

The border starts at 44".  The new variable dTempW reports 88" after I apply the scale of x2.

When I actually apply the dTempW the drawing border is almost 176" instead of the 88".  Perhaps I've looked at this too long, but I can't figure out why my shape becomes 176" when I explicitly set it to 88".

Any help would be greatly appreciated!