View Full Version : Use commands transparently in acad.lsp
a_meteni
2006-02-28, 07:42 PM
I'm trying to include some shortcuts with transparent commands in my acad.lsp file but it's not working! Is it not possible to use transparent commands here or what?
I'm trying to include some shortcuts with transparent commands in my acad.lsp file but it's not working! Is it not possible to use transparent commands here or what?
Do you have an example?
I'm not sure what your intent is.
a_meteni
2006-02-28, 08:20 PM
i'm trying to add a shortcut to get intersection point defined by 4 endpoints
(DEFUN C:MR () (COMMAND "LINE" "'CAL" "" "ILL(END,END,END,END"))
Tom Beauford
2006-02-28, 08:42 PM
The last quotation mark needs to be moved to the right between the two right parenthises.
(DEFUN C:MR () (COMMAND "LINE" "'CAL" "" "ILL(END,END,END,END)")
i'm trying to add a shortcut to get intersection point defined by 4 endpoints
(DEFUN C:MR () (COMMAND "LINE" "'CAL" "" "ILL(END,END,END,END"))
Hi a_meteni,
There are other ways to do this, but try:
(command "line" (c:cal "ILL(END,END,END,END)"))
I'm not sure ILL is the function you want to obtain the results you desire, but cal will work this way.
Also, have you looked at the inters function in the help file?
Take care,
kennet.sjoberg
2006-02-28, 09:21 PM
The last quotation mark needs to be moved to . . .
Does it work ?
Otherwise you can try this
(defun c:MR (/)
(command "LINE" (inters (getpoint "End 1 " ) (getpoint "End 2 " ) (getpoint "End A " ) (getpoint "End B " ) nil ) )
(while (= (getvar "CMDACTIVE" ) 1 ) (princ "next " ) (command pause ) ( ) )
(princ)
)
: ) Happy Computing !
kennet
CadDog
2006-02-28, 10:14 PM
You may want to start by creating second lsp file to story these types of commands...
and keep acaddoc.lsp free of these small lisp sub problems...
Just a thought...
ccowgill
2006-02-28, 11:02 PM
acad.lsp is different than acaddoc.lsp
kennet.sjoberg
2006-02-28, 11:13 PM
You may want to start by creating second lsp file to story these types of commands...
and keep acaddoc.lsp free of these small lisp sub problems...
Just a thought...
Why ?
: ) Happy Computing !
kennet
a_meteni
2006-03-01, 07:43 PM
Actually that's what i need (the inters function )
thanks a lot
CadDog
2006-03-01, 10:49 PM
Why ?
: ) Happy Computing !
kennet
We found that it makes it better the manage these smaller lisp programs...
I use a company "office.lsp" and a "user.lsp" and add IF's in acaddoc.lsp...
This way the user, if he knows and wants, can have his own sub programs running.
We have a few user who know how to do lisp and like the freedom to play around with ideas. By having there own user.lsp on the server under their login name make it save and keeps the company cord from being mess with.
This idea may be more than a_meteni may want to handle but I want to pass on an idea if not for now maybe in the future...
Lastly, because no one ever changes the code in the acaddoc.lsp it makes it easy to trouble shoot.
I hope that helps...
kennet.sjoberg
2006-03-02, 07:15 AM
We found that it makes it better the manage these smaller lisp programs...
I use a company "office.lsp" and a "user.lsp" and add IF's in acaddoc.lsp...
This way the user, if he knows and wants, can have his own sub programs running.
We have a few user who know how to do lisp and like the freedom to play around with ideas. By having there own user.lsp on the server under their login name make it save and keeps the company cord from being mess with.
This idea may be more than a_meteni may want to handle but I want to pass on an idea if not for now maybe in the future...
Lastly, because no one ever changes the code in the acaddoc.lsp it makes it easy to trouble shoot.
I hope that helps...
What a coincidence 8) Link#1 (http://forums.augi.com/showthread.php?t=33593&page=2&pp=10#post279546) and Link#2 (http://forums.augi.com/showthread.php?t=33593&page=1&pp=10#post284248)
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.