Hey guys,
I need a lisp that calculate the distance between two points and put the distance in the midpoint above the line.
Thanks in advance.
Fabricio
|
Hey guys,
I need a lisp that calculate the distance between two points and put the distance in the midpoint above the line.
Thanks in advance.
Fabricio
Hey guys,
I need a lisp with the LAYON nad LAYTHW command together.
Thanks in advance.
Fabricio
Have you ever used the command line version of the layer command?
What prompts / inputs does a user need to do to accomplish your request?
Did you know you could easily create this routine for yourself? It really isn't that difficult.
Let's start off. To have a AutoLISP routine be executable by typing only the name of the routine, we would start off like this:
The first word in the code above tells AutoLISP that you want to define a function. This executable command is thawall. By prefixing the command name, we tell AutoLISP we do not want to have to run this command by surrounding it with parenthesis. The final set of parenthesis "()" are for some argument and local variable definitions. When the command is to be executable without surrounding with parenthesis, there cannot be any arguments. This routine you are trying to create most likely will not have any variables, either. That is why there is nothing between that set of parenthesis.Code:(defun c:thawall ()
You want to execute the layer command so we can thaw and turn on all the layers. To execute a AutoCAD command from AutoLISP, you would start the command function and surround the AutoCAD command with quotation marks.
For each option you want to execute, you would also place them within their own set of quotation marks.Code:(command "layer"
Code:"thaw"Of course, each one of those options asks for which layer names. You would provide that within another set of quotation marks.Code:"on"
To end the layer command properly, we need to send an 'Enter' to AutoCAD. We would do that by adding an empty set of quotation marks and a closing parenthesis.Code:"*"
To finish defining the function, we need to also provide another closing parenthesis.Code:"")
Now, the code that I have provided above will work as long as you piece it together in the right order. Once it is pieced back together, you would execute this routine by typing "thawall" at the command line. Good luck.Code:)
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
I'm going to try Opie...
Thanks for the tips
But if I didn't doing the routine, you'll give the full routine??
Best Regards.
I already did. It is just not put together. If it doesn't work, post it here and someone can point out what went wrong.
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
I did too.
But didn't work as I expected.
I think that I am doing something wrong.
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
Thanks, Opie...
Very simple routine, but really useful.
(defun c:thaw ();;Aqui é onde vc inseri o nome do comando
(command "layon")
(command "laythw")
(princ)
)
Thanks!
Following Opie's suggestion will look something like this :
Code:(defun c:LAyThawOn () (command "-layer" "on" "*" "") (command "-layer" "thaw" "*" "") (princ))