Results 1 to 3 of 3

Thread: AutoCAD LT 2006 - add "IF" logic to Floating Viewport macros

  1. #1
    100 Club Paul Munford's Avatar
    Join Date
    2006-08
    Location
    London
    Posts
    177
    Login to Give a bone
    0

    Default AutoCAD LT 2006 - add "IF" logic to Floating Viewport macros

    I am currently having lots of fun designing new command buttons for my fellow draughters. So far they've been pretty simple * , but I'd like to make them more complicated. I am new to Diesel and could use someone to bounce ideas off...

    These two macro's spin the view in the viewport by 90 degrees left and right.

    ^C^C_UCS;Z;270;PLAN;; - CLOCKWISE

    ^C^C_UCS;Z;;PLAN;; - ANTICLOCKWISE


    This is cool, but could be better...

    For example, if the viewport is locked the UCS continues to spin. Also if you are not in a viewport the UCS continues to spin round... Not necessarily a problem, but could be inconvenient.


    I have a feeling I can solve both of these issues by using an 'IF' statement and getvars. I don't really understand the format that an 'IF' statement takes, i.e which part of the formular is doing what. Could any one 'lead me through' it, or point to a good tutorial?

    Cheers - in advance...

    * The Macro's - not the draughters...

  2. #2
    I could stop if I wanted to tyshofner's Avatar
    Join Date
    2004-03
    Location
    Dallas, Tx
    Posts
    229
    Login to Give a bone
    0

    Default Re: AutoCAD LT 2006 - add "IF" logic to Floating Viewport macros

    Here is sample IF for you:

    $M=$(if,$(=,$(getvar,tilemode),1),TRUE,FALSE)

    The portion in orange is the test (IF "tilemode" equals 1). If the test is true it does the first statement, if the test is false it does the second statement. Each statement is separated by a comma.

    Ty

  3. #3
    100 Club Paul Munford's Avatar
    Join Date
    2006-08
    Location
    London
    Posts
    177
    Login to Give a bone
    0

    Default Re: AutoCAD LT 2006 - add "IF" logic to Floating Viewport macros

    Thanks Ty, That's a good start. I will take this away and have a play with it...

Similar Threads

  1. 2011: "floating" viewport
    By johnf.77896 in forum ACA General
    Replies: 3
    Last Post: 2011-02-07, 11:26 PM
  2. "or" logic with schedule fi;tering.
    By mjdanowski in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2008-08-27, 07:57 PM
  3. AutoCAD 2006 - Missing all the buttons on "Dimension" toolbar
    By jonathanschade in forum AutoCAD CUI Menus
    Replies: 3
    Last Post: 2007-03-23, 11:57 PM
  4. Replies: 2
    Last Post: 2005-08-18, 06:00 AM

Posting Permissions

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