Author Topic: Updating blocks with lisp...auto redfine + delete lines  (Read 2331 times)

0 Members and 1 Guest are viewing this topic.

risfuk

  • Guest
Updating blocks with lisp...auto redfine + delete lines
« on: February 26, 2009, 12:05:42 PM »
Hi all

am new to this site + all the lisp stuff.....i have a project to do...where i have to change close to 2000 blocks

The blocks need to be updated in the means of a few lines deleted which is on a different layer + some of the attributes taken out

Once this is done I would like to update the blocks within working drawings

Is this possible by using VB + lisp files to make this automatic

all help would be great thanks

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #1 on: February 26, 2009, 12:25:11 PM »
I'm sure it's possible with both languages, as I know it can be done with Lisp by itself.  It wouldn't be too hard to redefine a block within multiple drawings, but once attributes are involved, it is a little harder, as they are separate entities from the block, but still linked to the block.

How much experience do you have with writing lisp?

Welcome to theSwamp.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

risfuk

  • Guest
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #2 on: February 26, 2009, 12:34:26 PM »
Thanks for the welcome  :-) i only started out with lisp but had quite experience with VB...mmm i did think the update with attributes would be the tricky part of it..... have had a quick play today and manged to update the block its self but with the attributes i had to run a attsync comand which had to be done manually...


FengK

  • Guest
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #3 on: February 26, 2009, 12:49:17 PM »
have had a quick play today and manged to update the block its self but with the attributes i had to run a attsync comand which had to be done manually...

manually? you're using vba right? did you try ThisDrawing.SendCommand ("ATTSYNC" ...)?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #4 on: February 26, 2009, 01:20:53 PM »
If you are just removing attributes, and not adding them, then that isn't too hard, as long as you know the ' Tag ' property.  Just search the drawing for said block, then step through the attribute collection comparing the ' Tag ', and if it matches then delete the attribute.  No need to use the command ' attsync '.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

risfuk

  • Guest
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #5 on: February 27, 2009, 01:37:47 PM »
Has anyone got any good examples in Vb then? or a good know of a good site to get some from cheers  :-D

risfuk

  • Guest
Re: Updating blocks with lisp...auto redfine + delete lines
« Reply #6 on: March 04, 2009, 04:49:06 PM »
bump