wpeacock
2005-01-31, 12:45 AM
I'm using the following code to insert a block into a drawing.
Once the code has finished there appears to be no block.
Zoom > Extents ....No Block
However using "bcount" AutoCAD counts the block and returns
"J102622......1" to the command line.
How can I make the block visible?
Regards
Wayne
Private Sub CommandButton1_Click()
'create the block
Dim J102622 As AcadBlock
Dim J102622Pnt(0 To 2) As Double
Dim J102622PathName As String 'describe thew path name of the block
J102622Pnt(0) = 0: J102622Pnt(1) = 0: J102622Pnt(2) = 38 'blocks xyz insertion points
J102622PathName = "C:\Temp\102622xyz.dwg" 'path of block
' Add the external reference to the block
Set J102622 = ThisDrawing.Blocks.Add(J102622Pnt, "J102622")
' Insert the block
Dim blockRefObj As AcadBlockReference
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(J102622Pnt, "J102622", 1#, 1#, 1#, 0)
blockRefObj.Update
ZoomAll
End Sub
Once the code has finished there appears to be no block.
Zoom > Extents ....No Block
However using "bcount" AutoCAD counts the block and returns
"J102622......1" to the command line.
How can I make the block visible?
Regards
Wayne
Private Sub CommandButton1_Click()
'create the block
Dim J102622 As AcadBlock
Dim J102622Pnt(0 To 2) As Double
Dim J102622PathName As String 'describe thew path name of the block
J102622Pnt(0) = 0: J102622Pnt(1) = 0: J102622Pnt(2) = 38 'blocks xyz insertion points
J102622PathName = "C:\Temp\102622xyz.dwg" 'path of block
' Add the external reference to the block
Set J102622 = ThisDrawing.Blocks.Add(J102622Pnt, "J102622")
' Insert the block
Dim blockRefObj As AcadBlockReference
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(J102622Pnt, "J102622", 1#, 1#, 1#, 0)
blockRefObj.Update
ZoomAll
End Sub