Jump to content

Automatically Multiply User Input by a Constant


Recommended Posts

Posted

I was wondering if there is any way to write some code that automatically multiply the user input by a default constant.

 

For example, lets say I want to multiply everything by a constant. The idea is that after I run any command, if I input any length, the length that is drawn is the length * constant.

 

Thanks

Posted

What are you doing when you enter length, line, pline etc otherwise this will work 'cal length*25.4 for inch to mm.

Posted

Thanks for the response.

 

Sometimes I have to edit details that are drawn with a specific scale in the model space. So in order to facilitate the processes I was wondering if there is a way to always multiply the user input by a value.

 

For example, lets say that there is a detail that is drawn in 1:15. I have to multiply every distance in the model space by 6.66.... It would be a lot easier if that constant (6.66...) could be multiplied automatically.

Posted

Why would you draw at scale ? I can here the groaning from here, do your self a favor and rescale the whole lot to true size.

  • 6 months later...
Posted
Thanks for the response.

 

Sometimes I have to edit details that are drawn with a specific scale in the model space. So in order to facilitate the processes I was wondering if there is a way to always multiply the user input by a value.

 

For example, lets say that there is a detail that is drawn in 1:15. I have to multiply every distance in the model space by 6.66.... It would be a lot easier if that constant (6.66...) could be multiplied automatically.

I have the same scenario here. We do work for a plant that requires some if it's details be drawing in model space only, scaled down to fit in a standard titleblock, meaning I have to draw it at the smaller scale. What I do is scale the entire drawing up from base point 0,0,0 then do my work and scale it back down at base point 0,0,0. It only takes a second but makes the work so much easier.

 

Good luck

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...