Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Alias with custom command

7 REPLIES 7
Reply
Message 1 of 8
gruzlor
2592 Views, 7 Replies

Alias with custom command

Hi,

 

I'm trying to get familiar with AutoCAD. Google and didn't manage to solve a problem :

In AutoCAD LT 2013, I created a custom command called Special fillet :

 

  • Name : Special fillet
  • Description : Round a polyline
  • Command display name : SFILLET
  • Macro : ^C^C_fillet;p;r;0.1

I created two aliases at the end of acadlt.pgp :
SF,         *SFILLET

C,          *COPY

 

When i type C, it works fine (just a test) but although it appears correctly in the Command prompt, SF doesn't work and it keeps telling me : UNKNOWN COMMAND "SF"

 

Last thing, if I create an icon in a toolbar with the special fillet command : it works fine... Very disturbing.

 

Any idea or advice?

Thanks.

7 REPLIES 7
Message 2 of 8
Kent1Cooper
in reply to: gruzlor


@gruzlor wrote:

.... I created a custom command called Special fillet :

....

Macro : ^C^C_fillet;p;r;0.1

.... if I create an icon in a toolbar with the special fillet command : it works fine... Very disturbing.

....


Does the icon in the toolbar work if the current Fillet radius isn't already 0.1?  I think you have your command options in the wrong order.  Try:

^C^C_fillet;r;0.1;p

Kent Cooper, AIA
Message 3 of 8
gruzlor
in reply to: Kent1Cooper

Thanks Kent for your answer.

 

Both solution work fine in the toolbar but none of them work as an alias (UNKNOWN COMMAND). I tried to restart AutoCAD, to reload acadlt.pgp.

 

Still searching...

Message 4 of 8
aqdam1978
in reply to: gruzlor

Hi

 another way is:

 

save this code in a text file and rename text file to "SF.LSP" then move this file to autocad SUPPORT folder.

 

(Defun C:SF()
(COMMAND "FILLET" "R" "0.1" "FILLET")
)

 

 

 

Now look for acaddoc.lsp, if you did not find this file then make it via Notepad and save it in SUPPORT folder.

Please add this line in acaddoc.lsp:

(LOAD "SF")

 

(close AutoCAD and run it again)

It's done! just type: SF and select two line to fillet!

 

hope to help you

 

Message 5 of 8
gruzlor
in reply to: aqdam1978

Hi aqdam1978,

 

Thanks. I tried but it also didn't work. Unless I'm wrong LISP is not supported with LT version of AutoCAD. Right?

Message 6 of 8
Kent1Cooper
in reply to: gruzlor


@gruzlor wrote:

Thanks Kent for your answer.

 

Both solution work fine in the toolbar but none of them work as an alias (UNKNOWN COMMAND). ....


I don't have LT, and don't know enough about defining commands there, and I don't find anything explicit about this in AutoCAD Help, but:  Could it be that aliases can be used only to invoke native AutoCAD [whether LT or full] commands?  If so, I don't know what you could do about it.

Kent Cooper, AIA
Message 7 of 8
aqdam1978
in reply to: gruzlor

YES, you are right,

My solution works fine with AutoCAD full version.

 

AutoCAD LT has not LISP capability.

I never had LT version, So I dont know how can customize your own commands.

In LT version you can just customize CUI only and you dont have access to:

1-AutoLISP

2-ObjectARX

3-Action Recorders

 

so, you can customize just AutoCAD native commands in CUI.

 

as I told you, I'm not familiar with LT version, so I can't help you! 😞

 

Message 8 of 8
gruzlor
in reply to: gruzlor

Yep... you're probably right and this thread seems to confirm your point.

I guess I will search a bit more and probably go for a keyboard shortcut.

 

Thanks again for the help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost