See the top rated post in this thread. Click here

Results 1 to 10 of 10

Thread: Using MTP w/ROTATE in toolbar button

  1. #1
    Member
    Join Date
    2012-04
    Location
    West Michigan
    Posts
    5
    Login to Give a bone
    0

    Default Using MTP w/ROTATE in toolbar button

    I am struggling to figure out how to incorporate the MTP snap override within the command string for a custom toolbar button.
    I would like the button to do the following:
    1. Launch the ROTATE command
    2. Accept a Window selection via the mouse (user input)
    3. Invoke the MTP (Mid Between 2 Points) snap override
    4. Accept two point selections via the mouse (user input)
    5. Rotate selected objects 90 degrees

    I cannot figure out how to get the MTP override to be recognized after I've made my window selection.
    Here are a couple things I've tried with the corresponding results:
    ^C^Crotate;\;_mtp;\;90;
    The command prompts for a Base Point on the Command Line w/o recognizing the _mtp input.
    ^C^Crotate;\_mtp;\;90;
    The command tries to use _mtp as a Select Objects input and fails.
    I'm pretty new to customization so my apologies for the basic question.
    Steve

  2. #2
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: Using MTP w/ROTATE in toolbar button

    ok I did what I could, could not get a window to work but you can pick one object and it will rotate 90 degrees, here is the command for the
    toolbar: ^C^C_rotate \;MTP \90^M

  3. #3
    Member
    Join Date
    2012-04
    Location
    West Michigan
    Posts
    5
    Login to Give a bone
    0

    Default Re: Using MTP w/ROTATE in toolbar button

    Thanks for providing what you were able, vtmiii.
    Unfortunately I have to be able to select a large group of objects, up to 400 3D Faces at one time that make up representations of furniture objects.
    Anyone else have any ideas?

  4. #4
    Member
    Join Date
    2007-05
    Location
    Chattanooga, TN
    Posts
    8
    Login to Give a bone
    1

    Default Re: Using MTP w/ROTATE in toolbar button

    It sounds like you are probably not using LT, so how about a quick and dirty LISP routine. Save the attached file, then drag it into your AutoCAD session. You can set it to autoload by using the "appload" command, then adding it to the "Startup Suite" (many ways to do this, but this is quick & easy).

    The command is currently R90, but this can be changed easily by opening the file in any text editor & making the necessary modifications. I tried to comment my code well enough that you can edit it at will, and maybe understand what is happening.
    Attached Files Attached Files

  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: Using MTP w/ROTATE in toolbar button

    Could you not use the Select command first then Rotate + Previous?

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

    Default Re: Using MTP w/ROTATE in toolbar button

    This is the macro I use:
    Code:
    ^C^C(setvar "orthomode" 1);_ROTATE;\;@;\(setvar "orthomode" 0);
    after selection pick with your mouse witch direction to turn in 90° increments.
    Rot_90.bmp icon attached.

    HTH
    Attached Images Attached Images

  7. #7
    Member
    Join Date
    2012-04
    Location
    West Michigan
    Posts
    5
    Login to Give a bone
    0

    Default Re: Using MTP w/ROTATE in toolbar button

    mad099,
    Thank you for the LISP routine and for so thoroughly documenting it. I do not know LISP and this gives me a great tool to start becoming familiar with it.
    Sorry for not including hardware/software specs. That's "Forum 101" etiquette and I should know better.
    AutoCAD 2014
    HP ZBook 15
    Intel i7-4800MQ 2.7GHz
    32 GB RAM
    64-bit Win 7 Pro SP1

    About 30 minutes before I wrote this post I was having issues when running the R90.lsp routine for the first time. It would rotate the geometry but it would move it as well. It wouldn't move very far, probably only a half inch positive X and a half inch positive Y, but any movement is problematic. However, as I was typing this post and trying to get some screenshots of the 'before' and 'after' states of the rotated geometry it suddenly started behaving properly. I don't know what has changed but I'm crossing my fingers it keeps working.

    Here's where I need some additional help:
    Since my original post I've now come across situations where, within the same file, I have to rotate some geometry 90 degrees and other geometry 45 degrees. I may come across additional situations where I have to rotate at some other angle.
    Because of these new requirements I am wondering how to edit the R90.lsp routine so that it will prompt for the desired angle of rotation.
    I'm sure it's possible but I haven't a clue how to make it happen.
    Any chance I can get some help modifying the original R90.lsp to the new requirement?
    Thank you all so much for the help so far.
    Steve
    PS: On a side note, how can I attach files to a thread reply other than images and videos? I'm sure I'm missing something obvious, but in the toolbar that appears in my Quick Reply window I cannot find a way to attach anything other than images or videos (like DWGs or LSPs, etc.). Thanks.

  8. #8
    Mod / Salary / SM Wanderer's Avatar
    Join Date
    2001-12
    Location
    St. Louis
    Posts
    5,407
    Login to Give a bone
    1

    Default Re: Using MTP w/ROTATE in toolbar button

    Quote Originally Posted by straits58 View Post
    mad099,
    PS: On a side note, how can I attach files to a thread reply other than images and videos? I'm sure I'm missing something obvious, but in the toolbar that appears in my Quick Reply window I cannot find a way to attach anything other than images or videos (like DWGs or LSPs, etc.). Thanks.
    When replying, if you click 'Go Advanced' to reach the more robust composition tools, you'll see an 'attachments' button... you can do the whole schmear there.
    Melanie Stone
    @MistresDorkness

    Archibus, FMS/FMInteract and AutoCAD Expert (I use BricsCAD, Revit, Tandem, and Planon, too)
    Technical Editor
    not all those who wander are lost

  9. #9
    Member
    Join Date
    2007-05
    Location
    Chattanooga, TN
    Posts
    8
    Login to Give a bone
    2

    Default Re: Using MTP w/ROTATE in toolbar button

    Try the attached. I tried to keep it simple, and added a few extra comments to the code to help you modify it as needed.
    Attached Files Attached Files

  10. #10
    Member
    Join Date
    2012-04
    Location
    West Michigan
    Posts
    5
    Login to Give a bone
    0

    Default Re: Using MTP w/ROTATE in toolbar button

    Wanderer,
    Thank you for pointing me to where/how I can attach files.

    mad099,
    Thank you very, very much for the updated LISP routine. Works like a charm.
    I have 632 symbol assemblies to modify, each of which will require anywhere from 4 to 10 uses of R90r2.lsp.
    You've saved me a lot of mouse clicks.

    You all are the best!

    Steve

Similar Threads

  1. toolbar button for dimension
    By jakob_k in forum AutoCAD Customization
    Replies: 4
    Last Post: 2009-08-14, 08:17 PM
  2. Would like Toolbar description to appear under toolbar button
    By danny.139703 in forum AutoCAD General
    Replies: 1
    Last Post: 2007-05-21, 05:47 PM
  3. Is there an easy way to have a Toolbar button call up another Toolbar?
    By jonathanschade in forum AutoCAD CUI Menus
    Replies: 5
    Last Post: 2007-04-12, 04:40 PM
  4. E-mail toolbar button
    By jsr13 in forum AutoCAD Customization
    Replies: 9
    Last Post: 2005-08-08, 08:47 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
  •