TheSwamp

Code Red => VB(A) => Topic started by: krampaul82 on August 28, 2007, 12:57:26 PM

Title: Exploding on insert of a block in vba
Post by: krampaul82 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
Title: Re: Exploding on insert of a block in vba
Post by: David Hall 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
Title: Re: Exploding on insert of a block in vba
Post by: krampaul82 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......
Title: Re: Exploding on insert of a block in vba
Post by: David Hall on August 28, 2007, 05:23:25 PM
So did it work?