Alias commands in Advance Steel

Alias commands in Advance Steel

Tony_Gibbs
Advocate Advocate
3,118 Views
7 Replies
Message 1 of 8

Alias commands in Advance Steel

Tony_Gibbs
Advocate
Advocate
There is a command in Advance Steel "-ASTRANSFORMANDCONNECT" and I can create an alias for that but I want to add a command to the end of it so it automatically goes to COPY. As it is the above command gives me 7 options and I would like to go to COPY. In my toolbar command I use ^C^C-ASTransformAndConnect _c and it goes straight to COPY. I have tried this line of text in the PGP file but it won't allow spaces. Any ideas out there how to get this to work in the PGP file
0 Likes
Accepted solutions (1)
3,119 Views
7 Replies
Replies (7)
Message 2 of 8

iwafb
Advisor
Advisor

Hi Tony,

 

You can define shortcuts not allowed in ACAD.PGP with Lisp.

 

If you are not familiar with lisp, you can create your own file (say "utilities.lsp) in which case you'll have to make sure you load the routine into autocad before you can execute, or you can create a file called "acaddoc.lsp" which will automatically load every time you open a drawing (needs to be in the autocad search path).

 

You can then add your own definitions. Example:

 

;;;
;;; Definitions not allowed in ACAD.PGP
;;;

;; Zoom Extents

(defun c:ze ()(command "_.zoom" "_e"))

;; Zoom Vmax

(defun c:zv ()(command "_.zoom" "_v"))

;; Zoom dynamic

(defun c:zD ()(command "_.zoom" "_d"))

 

In your case you might go:


;;AS copy shortcut

(defun c:ASC()(command "_ASTransformAndConnect" "_c"))

Message 3 of 8

Tony_Gibbs
Advocate
Advocate
Accepted solution
Thank you very much. I am very familiar with Lisp. This should be a piece of cake now Regards Tony
0 Likes
Message 4 of 8

iwafb
Advisor
Advisor

No Problems.

 

I've noticed that the shortcut does not suppress the dialogue though. Would be interested in finding out if you manage to do it...

0 Likes
Message 5 of 8

Tony_Gibbs
Advocate
Advocate
Mine does work without the dialogue box (See Attachment)



Also do you know what the command in Lisp would be for the Snap Point Filter
(See last defun in attachment) .x works in the toolbar but not in Lisp



Regards

Tony





__________ Information from ESET Smart Security, version of virus signature
database 13877 (20160729) __________

The message was checked by ESET Smart Security.

http://www.eset.com
0 Likes
Message 6 of 8

iwafb
Advisor
Advisor

Hi Tony,

 

1) Couldn't see an attachment... Did you use the shortcut exactly as I had it? I've got AS2017 and the dialogue pops up.

 

2) You can either use filters:

 

(command "move" object "" basepoint ".xz" basepoint destination) ;move in y direction

 

or list your own point substituting values:

 

point1 (1 1 1)

point2 (2 2 2)

 

 

Then if you want point 3 to be (1 1 2)

(setq point3 (list (car point1)(cadr point1)(caddr point2)))

0 Likes
Message 7 of 8

Tony_Gibbs
Advocate
Advocate
Sorry about that Here it is ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;Command Alias;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Zoom Extents (defun c:z ()(command "_.zoom" "_e")) ;; Autocad Copy (defun c:c ()(command "_.copy")) ;; Advance Steel Copy (defun c:cc ()(command "-ASTransformAndConnect" "_c")) ;; Snap Point Filters X (defun c:xx ()(command ".x")) Maybe you could change the last defun for me Thank you very much for your help Tony
0 Likes
Message 8 of 8

Anonymous
Not applicable

Hello,
where did you find the options for command "-ASTRANSFORMANDCONNECT"?.
Thank's

0 Likes