Jump to content

insert block and make the force autocad updating TAGS


rodrigo_sjc_sp
 Share

Recommended Posts

How to insert AUTOCAD block and make the force autocad updating TAGS??

 

 

I use this command

 

(command "insert" (strcat "*"blockwithPath) (getpoint "\nSelect insertion point: ") "1" "0" "1")

Link to comment
Share on other sites

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • rodrigo_sjc_sp

    13

  • ReMark

    8

  • Bhull1985

    3

  • Lee Mac

    2

Top Posters In This Topic

When you insert the block, if he finds a new tag him of the following error

"Unknown command"

 

The insertion is ok , more the new tag does not come along with the block.

Link to comment
Share on other sites

Try the ActiveX insertblock method:

(vla-insertblock
   (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))
   (vlax-3D-point [color=green]<insertion-point>[/color])
   [color=green]<block-name>[/color]
   1.0 1.0 1.0 0.0
)

Link to comment
Share on other sites

Lee,

 

It did not work, even doing so it does not update the new tags,

 

Is there any command to insert a block it updates all blocks

DWG with the same name?

 

If I have a block with name tag with the X,

and then I insert a new block with name tags with the X and Y

 

Is there any way using Lisp to insert this block and update the tags

all blocks with the same name?

Link to comment
Share on other sites

Are the two blocks named the same?

 

You're just basically substituting the first block (with one attribute) with the second block that has two attributes right?

Link to comment
Share on other sites

Yes Remark,

 

 

 

The user insert a block name BLOCK A, the block contain two attributes (A1, A2).

Someone else has changed this original block by inserting a new attribute (a3)

When I give the command to insert it does not update the new attribute

it only appears (a1, a2).

 

The correct result would be to insert the block, and update the new

attribute (a1, a2, ((a3)) )

 

What I need is the following, if I insert a block existing force it to update the attributes.

Link to comment
Share on other sites

One way it can be done without using lisp. Your task is how to replicate the steps using lisp.

 

Update a drawing with a block of the same name…

 

1. Open the drawing where block XYZ needs to be replaced.

 

2. Using Design Center (ADCENTER) navigate to the drawing file that has the updated XYZ block, and in the left window pane, expand the contents of the drawing (ie. click the "+" sign).

 

3. Click on the topics called BLOCKS, find the "good" block, right-click on it, and from the pop-up menu select "Redefine Only".

 

The blocks in your current drawing should update accordingly.

Link to comment
Share on other sites

ReMark , must be in the same LISP, it is a system that I am doing to insert blocks.

 

Because when using the insert command, it does not update the new attributes?

Link to comment
Share on other sites

I find it difficult to believe this problem has not been solved with a lisp routine posted somewhere on the Internet. Did you search for one?

Link to comment
Share on other sites

If I had a code you would have had it by now yourself.

 

What search criteria did you use? I'm continually amazed at people who say they "searched all over" and found nothing. Usually the problem is their search criteria was faulty.

Link to comment
Share on other sites

Lisp insert block update attributes

 

 

I am still researching more, only posted here because it could

be someone had the hint, but I will continue searching

Link to comment
Share on other sites

Expand your search. I found something over at The Swamp that might work. It is called Replace.lsp written by Richard D. Howard (1990) and submitted by danallen.

 

Link to comment
Share on other sites

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

 Share


×
×
  • Create New...