Results 1 to 8 of 8

Thread: How do I create a single, short, typed command for a linked group of commands?

  1. #1
    Member
    Join Date
    2012-10
    Posts
    6
    Login to Give a bone
    0

    Default How do I create a single, short, typed command for a linked group of commands?

    How do I create a single, short, typed command for a linked group of commands? For example, I would like to type "ZD" for Zoom, enter, Dynamic; "UO" for Ucs, enter, Object; "ZW" for Zoom, enter, Window, etc. Thanks!

  2. #2
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    The simplest way to make command+sub-command sequences available is through an autoloaded lisp file.

    BTW, you don't need Zoom+Window - Window is the default Zoom option.

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    Quote Originally Posted by archiasmo954906 View Post
    How do I create a single, short, typed command for a linked group of commands? For example, I would like to type "ZD" for Zoom, enter, Dynamic; "UO" for Ucs, enter, Object; "ZW" for Zoom, enter, Window, etc. Thanks!
    Example:
    Code:
    (defun C:ZD ()(vl-cmdf "._zoom" "_dy"))
    
    (defun C:UO ()(vl-cmdf "._ucs" "_ob"))
    R.K. McSwain | CAD Panacea |

  4. #4
    All AUGI, all the time Liamnacuac's Avatar
    Join Date
    2016-01
    Location
    Earth
    Posts
    508
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    Ok, but if I want a macro for a toolbar or a ribbon? What have I done wrong here?
    (command "_pline" "" "") (command "_pedit" "l" "s" "" "") (command "change" "l" "p" "lt" "tracks" "" "")

  5. #5
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    Quote Originally Posted by Liamnacuac View Post
    Ok, but if I want a macro for a toolbar or a ribbon? What have I done wrong here?
    (command "_pline" "" "") (command "_pedit" "l" "s" "" "") (command "change" "l" "p" "lt" "tracks" "" "")
    What are you trying to do?
    The Pline command is still running when you start the Pedit command.
    IF the Pedit command starts, the pline has only two vertices - are you trying to convert it to a spline?

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    Quote Originally Posted by Liamnacuac View Post
    Ok, but if I want a macro for a toolbar or a ribbon? What have I done wrong here?
    (command "_pline" "" "") (command "_pedit" "l" "s" "" "") (command "change" "l" "p" "lt" "tracks" "" "")
    Well, actually ^that^ is lisp code, which is OK. But if you are putting this in a toolbar or ribbon, you *could* use a menu macro as an alternative.
    As pointed out above, it is unclear what you want this to do though....
    It looks like you want to draw a two point polyline, convert it to a splined pline, and change the linetype to tracks.
    Since it doesn't make much sense to spline a 2 vertex pline, this macro will let you draw a 4 vertex pline.
    Try this.

    Code:
    ^C^C._pline;\\\\;pedit;l;s;;change;l;;p;lt;tracks;;
    R.K. McSwain | CAD Panacea |

  7. #7
    All AUGI, all the time Liamnacuac's Avatar
    Join Date
    2016-01
    Location
    Earth
    Posts
    508
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    This is more what I was expecting to use, but I must have missed a back slash on the end of the pline command, and when that didn't work, I went off on my tangent.. Thanks, guys! This gets me going in the direction I want..

  8. #8
    All AUGI, all the time Liamnacuac's Avatar
    Join Date
    2016-01
    Location
    Earth
    Posts
    508
    Login to Give a bone
    0

    Default Re: How do I create a single, short, typed command for a linked group of commands?

    So, why does spline react differently to the macro? Is it because with pline, you locate the first point before there are options, whereas with spline there are options OR the first point?

Similar Threads

  1. 2015: Can´t create a Linked File from a group
    By francisco.cespedes468051 in forum Revit Architecture - General
    Replies: 0
    Last Post: 2015-04-29, 05:01 PM
  2. create typed shortcut for command group
    By archiasmo954906 in forum API Wish List
    Replies: 5
    Last Post: 2012-10-29, 10:01 PM
  3. Short cut commands
    By fjtdogeno in forum AutoCAD General
    Replies: 2
    Last Post: 2011-08-01, 03:21 PM
  4. Replies: 0
    Last Post: 2010-09-03, 07:14 AM
  5. Replies: 4
    Last Post: 2006-02-03, 07:34 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
  •