Jump to content

Seting drawing scales with variables


Recommended Posts

Guest looseLISPSsinkSHIPS
Posted

Hola!

 

We have a situation where we use varying scale sizes for particular block (template dwg) inserted into our other drawings. Depending on our user input in the custom VBA program a scale is determined and located within an excel table. This information appears in cell 2E on worksheet #2.

 

What I'm trying to achieve at the moment is to set a variable to the value of this particular cell and then use it to set the required block (template dwg) size/ scale automatically.

 

I know my scale contains a hash (#) so I need to Dim it as a Double. So far I got this, perhaps you might know better?

 

;===CODE SNIPPET STARTS HERE===

 

Dim FTW As Double

 

'Sets template insertion scale...

FTW = worksheet(2).cells(5, 2).value

ObjBlockRef.XScaleFactor = FTW

ObjBlockRef.YScaleFactor = FTW

ObjBlockRef.ZScaleFactor = FTW

 

;===CODE SNIPPET ENDS HERE===

 

Thanks-

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...