TheSwamp

Code Red => VB(A) => Topic started by: Matersammichman on December 13, 2006, 01:08:32 PM

Title: VBA equivalent to Burst?
Post by: Matersammichman on December 13, 2006, 01:08:32 PM
My BURST command freaks out at least once daily  :ugly:
Does anyone know a VBA equivalent?
Title: Re: VBA equivalent to Burst?
Post by: CmdrDuh on December 13, 2006, 02:56:20 PM
not that I know of, but it wouldn't be hard to code it up
Title: Re: VBA equivalent to Burst?
Post by: Matersammichman on December 13, 2006, 03:23:48 PM
I don't mind doing the legwork, but could you throw me a clue or two?
Title: Re: VBA equivalent to Burst?
Post by: iliekater on December 13, 2006, 03:30:57 PM
What does the BURST command do ?
Title: Re: VBA equivalent to Burst?
Post by: Arizona on December 13, 2006, 03:32:00 PM
Ok, here is some bits and pieces, I hope it is enough to get you started... (Sorry, I had about two minutes before I had to leave)

Select your block
Code: [Select]
  If objOldBlk.HasAttributes Then
              varOldAtt = objOldBlk.GetAttributes     'get block attributes
            End If
Get your attributes, insertion points, text strings, etc...
Add text and feed back all the above values.

Title: Re: VBA equivalent to Burst?
Post by: CmdrDuh on December 13, 2006, 04:05:31 PM
burst is explode without losing the attribute values.  So as AZ started, you need to get the block, filter the attributes, create a text equal to the att value, making sure to use the right layer, etc.  Then explode block, and erase/delete any attdef s that were in the selection set.  In a nutshell that is what needs to happen.  I have some att filter code, and an iterator for working through the atts, so all you really need is the text insertion (easy) and the deletion of attdefs (not something I know how to do.  The hard part is keeping them in the selection set.)
Title: Re: VBA equivalent to Burst?
Post by: Guest on December 13, 2006, 04:14:44 PM
I've done the before.  Let me see if I can find it.


Stay tuned....
Title: Re: VBA equivalent to Burst?
Post by: Guest on December 13, 2006, 04:19:33 PM
If the file name is any indicator (RemoveAttDefs.dvb) I have a VBA-type BURST.

HOWEVER.... Somebody (me) password protected it and now I'm racking my brain trying to figure out what the F it could be!!  :realmad:
Title: Re: VBA equivalent to Burst?
Post by: Matersammichman on December 13, 2006, 04:32:08 PM
[link removed]

Comment from MP: The intent to help a fellow swamper is appreciated Matersammichman but the swamp isn't about breaking passwords or thwarting author's attempts to protect their work. Peace.
Title: Re: VBA equivalent to Burst?
Post by: Guest on December 13, 2006, 04:35:15 PM
Not needed... I figured it out.

And here it is.  It needs a little tweaking but it gives you a starting point.  It will prompt you to save the drawing in E:\Temp  (you can change that).

Any questions, lemme know.
Title: Re: VBA equivalent to Burst?
Post by: Matersammichman on December 15, 2006, 07:33:32 AM
Nice work.
Thanks Matt and everyone!