Jump to content

Recommended Posts

Posted

Sorry for piping in so late on this topic but I was interested. The layer "AM_5" implies you are using AutoCAD Mechanical or a drawing from AutoCAD Mechanical? AutoCAD Mechanical uses a custom object for leaders, not the standard LEADER, QLEADER, or MLEADER. The leaders in AutoCAD Mechanical cannot be manipulated the same way.

 

Are you using AutoCAD Mechanical or trying to edit a drawing from AutoCAD Mechanical?

Posted

I use mech ...i know but i use layer 0 with color byblock for all drawings ...and the meccanica leader use bylayer color 

Posted (edited)
On ‎6‎/‎12‎/‎2019 at 3:58 AM, jim78b said:

how i can edit the qleader command, when i press :le i draw a quick leader on a layer but I can't bring it back to layer 0,

furthermore I have autocad mechanical which does not have the qleader command in the CUI interface but if i write LE i draw a quick leader!

 

i create a new command qleader and write this code: ^C^C-layer;set;AM_5; _QLEADER;\\\
^C^C_CLAYER 0;

 

1. don't back to layer 0

2. if i write LE command not recall my command!

 

Ok - so trying to understand your original post:

 

"how i can edit the qleader command, when i press :le i draw a quick leader on a layer but I can't bring it back to layer 0,"

 

The best tool for this is the previously mentioned Layer Manager tool by Lee Mac,

 

"...but if i write LE i draw a quick leader!"

 

LE is a command Alias controlled by the acad.pgp file. You can edit the command Aliases quickly using the Express Tools "Aliasedit" command. Otherwise you have to find the acad.pgp file in the support folders and edit the file in notepad. NOTE: You cannot put macro strings in this file - only straight commands.

 

"i create a new command qleader and write this code: ^C^C-layer;set;AM_5; _QLEADER;\\\
^C^C_CLAYER 0;

 

1. don't back to layer 0

2. if i write LE command not recall my command!"

 

1) Step through the QLEADER command - you only have 3 pauses and you probably need more. It is not an easy macro to do because there is a variable amount of inputs. You would be better to go to an AutoLISP macro for this, something like:

(defun C:QLL ()
   (setvar "CLAYER" "AM_5")
   (command "._QLEADER")
   (while (= (logand (getvar "cmdactive") 1) 1)
      (command pause)
   )
   (setvar "CLAYER" "0")
   (princ)
)

2) Your Macro in a Toolbar button is not recalled with a command Alias, only from the toolbar button; it does not redefine either the "QLEADER" command or the "LE" Alias. However - if you load the simple LISP I wrote above into your drawing - you can use the command "QLL" from the command line or a toolbar.

Edited by pkenewell
  • Like 1
Posted
41 minutes ago, pkenewell said:

 

Ok - so trying to understand your original post:

 

"how i can edit the qleader command, when i press :le i draw a quick leader on a layer but I can't bring it back to layer 0,"

 

The best tool for this is the previously mentioned Layer Manager tool by Lee Mac,

 

"...but if i write LE i draw a quick leader!"

 

LE is a command Alias controlled by the acad.pgp file. You can edit the command Aliases quickly using the Express Tools "Aliasedit" command. Otherwise you have to find the acad.pgp file in the support folders and edit the file in notepad. NOTE: You cannot put macro strings in this file - only straight commands.

 

"i create a new command qleader and write this code: ^C^C-layer;set;AM_5; _QLEADER;\\\
^C^C_CLAYER 0;

 

1. don't back to layer 0

2. if i write LE command not recall my command!"

 

1) Step through the QLEADER command - you only have 3 pauses and you probably need more. It is not an easy macro to do because there is a variable amount of inputs. You would be better to go to an AutoLISP macro for this, something like:


(defun C:QLL ()
   (setvar "CLAYER" "AM_5")
   (command "._QLEADER")
   (while (= (logand (getvar "cmdactive") 1) 1)
      (command pause)
   )
   (setvar "CLAYER" "0")
   (princ)
)

2) Your Macro in a Toolbar button is not recalled with a command Alias, only from the toolbar button; it does not redefine either the "QLEADER" command or the "LE" Alias. However - if you load the simple LISP I wrote above into your drawing - you can use the command "QLL" from the command line or a toolbar.

THANKS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...