BlackAlnet Posted June 9, 2009 Share Posted June 9, 2009 Hi, it's me, again... i'm very frustrated, coming here again... But i have a simple thing to do, and i'm not know how to do, or, what is wrong... I wish one day, come here and provide answers, not only questions...Now i have a question... I have a entity, "po", who is a entity, resulting from the "-boundary" command. I want to use the "area" command, and take the coordinates of the entity "po", for set the area... how could i write it properly?? (setq p (getpoint "\n Selecione area a extrair: ")) (command "-boundary" p "") (setq po (entget (entlast))) (entmod po) (command "area" (list po) "") (setq area (getvar "area")) (setq arealst (cons area arealst)) PS: Sry for bad english, and thanks for the help Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2009 Share Posted June 9, 2009 As you asked for only tips I won't re-write your LISP, but rather point you in the right direction: (entlast) Returns the Entity Name (ename) to be used with the Area command. There is no need to get the Entget Data... Also, you don't need to use "list" with the Area command, you are not supplying it with a list, you are supplying it with an Entity Name Quote Link to comment Share on other sites More sharing options...
BlackAlnet Posted June 9, 2009 Author Share Posted June 9, 2009 Thanks Lee Mac, you help me "A LOT", many times, i'm very grateful!!! Now, it works properly, yesss, xD!!! I'm soo happy, yuhul (setq p (getpoint "\n Selecione area a extrair: ")) (command "-boundary" p "") (setq po (entlast)) (command "area" "e" po) (setq area (getvar "area")) (setq arealst (cons area arealst)) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2009 Share Posted June 9, 2009 Excellent Its better when you get to the answer on your own, you'll learn more that way Happy to help, Lee Quote Link to comment Share on other sites More sharing options...
BlackAlnet Posted June 9, 2009 Author Share Posted June 9, 2009 Yes, i dont want that forum be a "lisp maker" for me. I only want tips, and anything who could help me to learn about lisp more and more Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2009 Share Posted June 9, 2009 Have you read the help articles on these functions - they contain a load of information about how to use them Are you using the Visual LISP Editor to make your code? Quote Link to comment Share on other sites More sharing options...
BlackAlnet Posted June 9, 2009 Author Share Posted June 9, 2009 i am reading "afralisp", and the tutorials from visual lisp editor . i'm using visual lisp too. Now on my job, i only write lisps, simple lisps. I always take a lisp from internet and modify to do what i want the lisp do. That is my 2 lisp, who i write from the begining I want to improve my knowledge, and make better lisps, with "error trapping" Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2009 Share Posted June 9, 2009 i am reading "afralisp", and the tutorials from visual lisp editor . i'm using visual lisp too. Now on my job, i only write lisps, simple lisps. I always take a lisp from internet and modify to do what i want the lisp do. That is my 2 lisp, who i write from the begining I want to improve my knowledge, and make better lisps, with "error trapping" Ahhh ok Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.