Jump to content

Can´t change attributes on a block from commandline!


Recommended Posts

Posted

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!

  • 2 weeks later...
Posted
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

Posted

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

Posted
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.

Posted

@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,

Posted

Thanks, msasu!

I will check that when i am at the office, i dont have access to the computer right now.

/Tom

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...