See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Utilitiy to permit entering values in units other than what is set in drawing?

  1. #1
    Member
    Join Date
    2023-07
    Posts
    16
    Login to Give a bone
    0

    Default Utilitiy to permit entering values in units other than what is set in drawing?

    After being away from Acad for many years, I am back using it now. The issue of needing to enter a distance in some units other than what the drawing has been set for, has been an issue for decades. I am surprised to find that the programmers at Acad still has not figured out how to permit this. E.g. I have a drawing set to use decimal inches, and need to create a circle that is 10mm diameter. Entering 10mm is not accepted by Acad.

    I've looked, but not yet found any utility programs that fix this limitation. Do any exist?

    -Joe

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,646
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    Why not just draw it in inches then scale it 100/254?

  3. #3
    Member
    Join Date
    2023-07
    Posts
    16
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    I have sometimes used that approach. But it certainly not as convenient as simply typing the value with the units.

    Now for a bit of a rant about Acad... there really is not excuse for a modern CAD system to require the user to do this work-around. Using metric parts in a machine being designed in English measurements is a common thing. I shouldn't have to memorize, or look up the conversion factors.

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,301
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    You can also use the transparent 'cal command.


    Command: CIRCLE
    Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:
    Specify radius of circle or [Diameter]: 'cal
    >>>> Expression: cvunit(10, mm, in)
    Resuming CIRCLE command.
    Specify radius of circle or [Diameter]: 0.39370078740157
    Command:
    C:> ED WORKING....

  5. #5
    Member
    Join Date
    2023-07
    Posts
    16
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    Thank you all for your replies. But, I really was hunting for a more direct solution. I.e when prompted for the radius of the circle, just appending the units like 10mm.

    The fact that no one seems to have solved this, suggests that modifying the command prompt is something that 3rd party programmers can't really access.

    -Joe

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,646
    Login to Give a bone
    1

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    You can only have one set of units assigned to each drawing but if you Xref as an overlay (not an attachment to avoid a circular reference!) the drawing set to English measurements into one set to Metric and have your INSUNITS, INSUNITSDEFSOURCE & INSUNITSDEFTARGET System Variables set correctly you should be able to add you Metric measurements in the Metric drawing over the English unit drawing.

  7. #7
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,301
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    Quote Originally Posted by joseph.dunfee805577 View Post
    The fact that no one seems to have solved this, suggests that modifying the command prompt is something that 3rd party programmers can't really access.

    -Joe
    You didn't say that you were a programmer. I mentioned that CAL can be run transparently. You can create your own transparent command that will return 10 mm. Basically, you would do what I showed you above, just hiding it from the user. Tom had a good idea though. You could call your command mmin. When you want to convert a mm value to in, just enter 'mmin and return, then enter the mm value and it will return the in value. See the command flag ACRX_CMD_TRANSPARENT.
    Last edited by Ed Jobe; 2023-07-12 at 02:55 PM.
    C:> ED WORKING....

  8. #8
    Member
    Join Date
    2023-07
    Posts
    16
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    I've done VBA programming for AutoCAD. Though, it has been over a decade since I have done much with it.

    Using a transparent command would not be bad. But, other than using a transparent command, do you happen to know if it is possible to intercept all command line entries where the user is prompted for a distance. Then check if there is a unit specified, and then automatically convert to the current units?

    - - - Updated - - -

    There certainly are a number of work-arounds for this issue. When i've had a metric hole pattern that I wanted to place on a part in an English drawing, I would sometimes start a new drawing that is set to the new units. Then after drawing that hole pattern in the metric drawing, I copy/paste it into the English drawing.

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,301
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    I've never tried making a VBA command transparent. I would have to do more research as I'm not sure that it can since it isn't able to create commands. You have to use the vbarun command to execute it. I use lisp wrappers to create commands. See my sticky thread at the top of the VBA forum.

    AFAIK, VBA doesn't have a way to monitor the command line input. You could however redefine your own line, circle command that could examine the input from the GetPoint method.

    Your work around is similar to Tom's suggestion to xref another model, but I prefer Tom's method if you're going to make a habit of it. Your method is ok for a one-off.
    C:> ED WORKING....

  10. #10
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,646
    Login to Give a bone
    0

    Default Re: Utilitiy to permit entering values in units other than what is set in drawing?

    Quote Originally Posted by joseph.dunfee805577 View Post
    Using a transparent command would not be bad. But, other than using a transparent command, do you happen to know if it is possible to intercept all command line entries where the user is prompted for a distance. Then check if there is a unit specified, and then automatically convert to the current units?
    A transparent command would be easiest with lisp I'd use the cvunit (AutoLISP) function that converts a value from one unit of measurement to another. Having the code check current unit settings already discussed could allow you to use the same command to convert between decimal inches and mm depending on settings in the current drawing.

    As there are multiple ways to respond to a prompt for distance like picking two points attempting to intercept every prompt for a distance would cause many issues. Half the user defined functions prompt for distance to take advantage of the different ways to enter the value.

Page 1 of 2 12 LastLast

Similar Threads

  1. 2019: Permit Drawing Set v. Construction Documents
    By andipiper in forum Revit Architecture - General
    Replies: 4
    Last Post: 2020-08-10, 06:42 PM
  2. More Units, more units, more units, more units
    By Wish List System in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2014-10-27, 01:47 PM
  3. Replies: 4
    Last Post: 2008-11-13, 05:36 AM
  4. Can't import all .dwt files into 2006 Publish Utilitiy
    By jorywb88968 in forum AutoCAD Plotting
    Replies: 3
    Last Post: 2005-06-15, 01:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •