TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: risfuk on February 26, 2009, 12:05:42 PM

Title: Updating blocks with lisp...auto redfine + delete lines
Post by: risfuk 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
Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: T.Willey 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.
Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: risfuk 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...

Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: FengK 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" ...)?
Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: T.Willey 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 '.
Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: risfuk 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
Title: Re: Updating blocks with lisp...auto redfine + delete lines
Post by: risfuk on March 04, 2009, 04:49:06 PM
bump