Author Topic: Exploding on insert of a block in vba  (Read 2247 times)

0 Members and 1 Guest are viewing this topic.

krampaul82

  • Guest
Exploding on insert of a block in vba
« on: August 28, 2007, 12:57:26 PM »
To Whom it may concern, I am a VBA Newby, Please be kind....
I am loading an ACAD block through a VBA program(see attached) into a drawing. I then want to explode that loaded block.  I found some script code in vba called send to command line (see attached) but it does not work It sends what looks like bar code to the command line.  Maby I'm making this way to complicated and should just let the user explode the block? Any advise would greatly be appreciated.  Many thanks to cmdrduh for your previous help on combobox!! you advise worked fine.:x

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Exploding on insert of a block in vba
« Reply #1 on: August 28, 2007, 03:17:38 PM »
From your code
Code: [Select]
Dim blockRefObj As AcadBlockReference
    Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(returnPnt, "C:\Acad_2008\2008_Blocks\Controllers\nxs0015a1007-01.dwg", 1#, 1#, 1#, 0)
 
blockRefObj.explode
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

krampaul82

  • Guest
Re: Exploding on insert of a block in vba
« Reply #2 on: August 28, 2007, 03:32:12 PM »
From your code
Code: [Select]
Dim blockRefObj As AcadBlockReference
    Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(returnPnt, "C:\Acad_2008\2008_Blocks\Controllers\nxs0015a1007-01.dwg", 1#, 1#, 1#, 0)
 
blockRefObj.explode

I wasn't even close thank you for putting up with me......

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Exploding on insert of a block in vba
« Reply #3 on: August 28, 2007, 05:23:25 PM »
So did it work?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)