Message 1 of 4
making a block

Not applicable
01-07-2000
01:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Group:
I had this code working in another routine. It makes a block
now it refuses to run, and throws an error 'type mismatch'
I've tried everything, what am I doing wrong here? Thanks in
advance
this is for release14, vba
thanks
If blkexist = False Then
Dim nwblk As AcadBlock
Dim tag1, tag2, tag3, tag4, def1, def2, def3, def4 As String
Dim blkinpnt1(0 To 2) As Double
blkinpnt1(0) = 0#: blkinpnt1(1) = 0#: blkinpnt1(2) = 0#
Dim blkinpnt2(0 To 2) As Double
blkinpnt2(0) = 0#: blkinpnt2(1) = 1#: blkinpnt2(2) = 0#
Dim blkinpnt3(0 To 2) As Double
blkinpnt3(0) = 0.0347222: blkinpnt3(1) = 1#: blkinpnt3(2) = 0#
Dim blkinpnt4(0 To 2) As Double
blkinpnt4(0) = 0.0347222: blkinpnt4(1) = 0#: blkinpnt4(2) = 0#
Set nwblk = ThisDrawing.Blocks.Add(blkinpnt1, "door")
Set nwblk = nwblk.AddLine(blkinpnt1, blkinpnt2)
Set nwblk = nwblk.AddLine(blkinpnt2, blkinpnt3)
Set nwblk = nwblk.AddLine(blkinpnt3, blkinpnt4)
Set nwblk = nwblk.AddLine(blkinpnt4, blkinpnt1)
Set nwblk = nwblk.AddArc(blkinpnt1, 1#, 0, 1.570796)
End If
I had this code working in another routine. It makes a block
now it refuses to run, and throws an error 'type mismatch'
I've tried everything, what am I doing wrong here? Thanks in
advance
this is for release14, vba
thanks
If blkexist = False Then
Dim nwblk As AcadBlock
Dim tag1, tag2, tag3, tag4, def1, def2, def3, def4 As String
Dim blkinpnt1(0 To 2) As Double
blkinpnt1(0) = 0#: blkinpnt1(1) = 0#: blkinpnt1(2) = 0#
Dim blkinpnt2(0 To 2) As Double
blkinpnt2(0) = 0#: blkinpnt2(1) = 1#: blkinpnt2(2) = 0#
Dim blkinpnt3(0 To 2) As Double
blkinpnt3(0) = 0.0347222: blkinpnt3(1) = 1#: blkinpnt3(2) = 0#
Dim blkinpnt4(0 To 2) As Double
blkinpnt4(0) = 0.0347222: blkinpnt4(1) = 0#: blkinpnt4(2) = 0#
Set nwblk = ThisDrawing.Blocks.Add(blkinpnt1, "door")
Set nwblk = nwblk.AddLine(blkinpnt1, blkinpnt2)
Set nwblk = nwblk.AddLine(blkinpnt2, blkinpnt3)
Set nwblk = nwblk.AddLine(blkinpnt3, blkinpnt4)
Set nwblk = nwblk.AddLine(blkinpnt4, blkinpnt1)
Set nwblk = nwblk.AddArc(blkinpnt1, 1#, 0, 1.570796)
End If