Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Tool Palette Commands with Custom MText Lisp

  1. #11
    Member
    Join Date
    2017-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: Tool Palette Commands with Custom MText Lisp

    The Tool Command must be changing the layer before the Lisp executes. It still does not change the layer back.

  2. #12
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: Tool Palette Commands with Custom MText Lisp

    You need to post exactly what it is your using Tom is right in that the suggested code resets the layer back to what it was before adding the mtext.

  3. #13
    Member
    Join Date
    2017-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: Tool Palette Commands with Custom MText Lisp

    This is what I have in the lisp:
    Code:
    ; Mtext at Viewtwist rotation
    (defun mtr (curlayer / clayer)
      (setq clayer(getvar'clayer))
      (setvar 'clayer curlayer)
      (setq twang (-(/ (* (GETVAR "viewtwist") 180.0) PI))
      )
      (initdia)
      (command "mtext" PAUSE "R" twang "J" "TC")
      (setvar 'clayer clayer)
    )
    This is what I have in the Tool Command
    Code:
    ^c^c^p(mtr "V-SITE-DECK-TEXT")
    Using these commands I always end up on layer V-SITE-DECK-TEXT.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Hide text in command line when using tool palette commands
    By jpcadconsulting347236 in forum AutoLISP
    Replies: 4
    Last Post: 2014-10-28, 06:00 PM
  2. Custom Tool Palette images
    By FabriCADed in forum AutoCAD Customization
    Replies: 4
    Last Post: 2013-05-28, 01:28 PM
  3. 2012: Add Custom Commands to Tool Palette
    By Darren Allen in forum AutoCAD General
    Replies: 14
    Last Post: 2013-04-02, 04:27 PM
  4. Put sub-assemblies into a Tool Palette or the Custom Tool Catalog?
    By justin.d.ehart in forum AutoCAD Civil 3D - Corridors
    Replies: 1
    Last Post: 2007-06-05, 03:52 PM
  5. Mtext key-in or Palette Text Tool ?
    By tomdillenbeck in forum ACA General
    Replies: 1
    Last Post: 2005-05-11, 11:31 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
  •