PDA

View Full Version : Block Insertions



wpeacock
2005-01-25, 07:34 AM
OK so I've been playing again, just copying the code from an example and changing some text.

This is some code for inserting a block (so that I can use the bcount command to count all the inserted block later on), Kind of looks OK but does not work! as if...

I keep getting a "filer" error but not too sure what this is, and how to fix it more to the point???
Can any one see where I'm going wrong...I've been looking and changing this for over an hour...I need a beer....

[code]
Private Sub CommandButton1_Click()
Dim ST109030 As AcadBlockReference
Dim ST109030Pnt(0 To 2) As Double 'Array of xyz coordinates of insertion point
ST109030Pnt(0) = 0: ST109030Pnt(1) = 0: ST109030Pnt(2) = 0 'xyz points
Dim ST109030PathName As String
ST109030PathName = "C:Temp109030xyz.dwg"
' Add the block
Set ST109030 = ThisDrawing.ModelSpace.InsertBlock(ST109030Pnt, "ST109030PathName", 1, 1, 1, 0)
ST109030.Update
End Sub
[code]