Tom_Drawer Posted October 22, 2009 Posted October 22, 2009 When i am trying to change attributes to a block via the command line it doesn´t work. I´ll have to change it from a toolbox. The problem is that i want to changed it everytime i start a drawing. I have created a lisp routine and put it in the acaddoc.lsp file to load it automaticly. (defun c:rev () (command "._insert" "ESYMB_30" "0,0" "" "" "" "0.8" "1.0" "3000" "PÅ")) (c:rev) and it returns "nil" From my experience that´s a OK! Quote
ollie Posted November 5, 2009 Posted November 5, 2009 When i am trying to change attributes to a block via the command line it doesn´t work.I´ll have to change it from a toolbox. The problem is that i want to changed it everytime i start a drawing. I have created a lisp routine and put it in the acaddoc.lsp file to load it automaticly. (defun c:rev () (command "._insert" "ESYMB_30" "0,0" "" "" "" "0.8" "1.0" "3000" "PÅ")) (c:rev) and it returns "nil" From my experience that´s a OK! Is the block in modelspace or paperspace i paperspace is it one or all sheets Quote
Tom_Drawer Posted November 10, 2009 Author Posted November 10, 2009 Hi, Ollie! The block is in the modelspace. Here is the whole problem: an office where i am doing some practice, uses the POINT plug on top on autocad mep 2009. That office has a cad manual that uses symbols in scale 0.8. The problem is when you start a drawing u have to set the symbol size to 0.8 every time. The symbol settings is changed by a toolbox in POINT. I thougt that was a vaste of time so a took a look in POINT and found that the settings was changed by giving a special block some new attributes. so far so good. But when i created the LISProutine to change it automaticly nothing happens with the symbol size . I also created a macro that opend the toolbox and maked the changes i wanted same ****, nothing happens. Any ideas Maybe i´m thinking wrong here:unsure: /Tom it is in all sheets Quote
MarcoW Posted November 11, 2009 Posted November 11, 2009 When i am trying to change attributes to a block via the command line it doesn´t work.I´ll have to change it from a toolbox. The problem is that i want to changed it everytime i start a drawing. I have created a lisp routine and put it in the acaddoc.lsp file to load it automaticly. (defun c:rev () (command "._insert" "ESYMB_30" "0,0" "" "" "" "0.8" "1.0" "3000" "PÅ")) (c:rev) and it returns "nil" From my experience that´s a OK! I am not shure what you want to do but for me it looks your code is not working too good. Note that I erased 1 " ) " at the end of the insert command: Command: (command "._insert" "ESYMB_30" "0,0" "" "" "" "0.8" "1.0" "3000" "PÅ") Unknown command "0.8". Press F1 for help. Unknown command "1.0". Press F1 for help. Unknown command "3000". Press F1 for help. Unknown command "PÅ". Press F1 for help. nil So it works to insert, then it ends (after the third ""). Then is handles 0.8 as a command, as you can see. If you want to insert a certain block on a specific location each time you open a drawing you should use something like this I'd say: (defun c:rev ( / ) (command "_.insert" "ESYMB_30" "0,0" "" "" "") (princ) ) From there on you might want to update a attribute that is in the specific block. Others might have a handy routine to help you out, I myself cannot write that down for you in a minute: I will have to spend lots of time searching. Good luck. Quote
MSasu Posted November 11, 2009 Posted November 11, 2009 @Tom_Drawer: Please make sure that the ATTREQ system variable is set to 1 - this ensure that the INSERT command will accept atributes input at command line. Regards, Quote
Tom_Drawer Posted November 13, 2009 Author Posted November 13, 2009 Thanks, msasu! I will check that when i am at the office, i dont have access to the computer right now. /Tom Quote
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.