See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: Recall a previous Input to save Dimension Style

  1. #1
    Member
    Join Date
    2017-01
    Location
    Carlisle, PA
    Posts
    3
    Login to Give a bone
    0

    Default Recall a previous Input to save Dimension Style

    Good Afternoon,

    I currently have a lisp routine that we run to scale our title blocks. It scales everything based on a user input. Right now we have to type the dimension style name in when prompted. What I am trying to add is a custom Dimension style name using the initial input so we don't have to manually type the name in each time. We would like the dimension style to me named "Echo Dec X" and "Echo X" with X being the input.

    Attached is my current lisp routine. Any help or guidance would be greatly appreciated!
    Attached Files Attached Files

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

    Default Re: Recall a previous Input to save Dimension Style

    First you should add a signature to your Profile including basic information like what Autodesk software and version you're using. Understanding your situation helps in providing suggestions. I assume you don't use Layouts for plotting if you're scaling title blocks, I've never used a Model Space Title block as Paper Space has been around for the past quarter century.

    If you're creating a new dimension style from user input each time you will always need user input. If X is an existing dimension style then you can easily pick the style using lisp functions getkword & initget. Take a look at Lee Mac's prompting examples: http://lee-mac.com/promptwithdefault.html

    Shouldn't X always be the current dimension style since that's the dimension style you're modifying?
    Code:
    (getvar 'dimstyle)

  3. #3
    Member
    Join Date
    2017-01
    Location
    Carlisle, PA
    Posts
    3
    Login to Give a bone
    0

    Default Re: Recall a previous Input to save Dimension Style

    We don't use the Layout tab for Plotting, we use Model Space for everything. When we start a new drawing for details/layouts we open up a title block that is scaled 1 to 1. The first thing we do is run the lisp routine to scale the title block, and dim styles. It asks you the what you want to scale the title block to (1/4, 3/8, 1/2, etc.) The routine scales everything in the drawing including the dimension styles, it then prompts you to enter the new dimension style name, and deletes the old one. What I am trying to do is, have it set the new dimension name to using the scale, you previously entered after the word "Echo Dec" and "Echo".

    This in an old lisp file we had and I am trying to update it.

    Hopefully that helps you understand it better. Thanks for the tips on the signature, I will update that!

    Thanks again.

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

    Default Re: Recall a previous Input to save Dimension Style

    Easy way would be to take advantage of Annotative Dimensions. Set Annotative Scale to whatever you're going to plot with your lisp and any Annotative Dimensions will be scaled to plot at the same size. I use the same couple Annotative Dimensions in all my drawings no matter what the scale. Before Annotative Dimensions came around years ago I had to have them for every scale we used which was a pain!

    While the CANNOSCALEVALUE system variable is read only you can set the CANNOSCALE system variable with lisp. Your template drawing would need to have what ever scalenames you use already defined in it.

  5. #5
    Member
    Join Date
    2006-07
    Location
    Portland, OR
    Posts
    28
    Login to Give a bone
    1

    Default Re: Recall a previous Input to save Dimension Style

    What release of AutoCAD are you using? This lisp was written for a pretty old version.
    I agree with Tom that if you have AutoCAD 2007 or later you would be best off rewriting the lisp to make use of Annotative Scale properties.

  6. #6
    Member
    Join Date
    2017-01
    Location
    Carlisle, PA
    Posts
    3
    Login to Give a bone
    0

    Default Re: Recall a previous Input to save Dimension Style

    We are using AutoCAD 2012 to AutoCAD 2015. I talked to manager about that option, they didn't want to go that route.

Similar Threads

  1. Save As Previous Versions
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2015-11-13, 04:37 PM
  2. recall last input
    By mhannan.100562 in forum AutoLISP
    Replies: 7
    Last Post: 2009-01-09, 05:10 PM
  3. Save as previous version
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2008-11-17, 06:14 PM
  4. Recall and input a variable
    By ch00su in forum AutoLISP
    Replies: 10
    Last Post: 2006-09-11, 12:36 PM
  5. Viewport name recall or view name recall
    By dervin in forum AutoCAD General
    Replies: 1
    Last Post: 2005-01-03, 06:43 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
  •