Hi,
Below is a small snippet of code for a project i'm working on, but when i try to run it, the Set Hline2 = FCBlock.AddLine(Hline2STARTPNT, Hline2ENDPNT) line flags an error, saying 'Invalid Procedure or Argument' - why? As far as i can see, its coded as it should be...
Option Explicit
Dim FCBlock As AcadBlock 'Block definition for Chart..
Dim FCBlockX As AcadBlockReference 'Insertable block reference for Chart..
Dim FCBlockPNT(0 To 2) As Double 'Insertion point for Chart block..
Dim Hline2, Hline3, Hline4, Hline5, Hline6, Hline7, Hline8, Hline9 As AcadLine 'Horizontal seperator lines between FXs..
Dim Hline2STARTPNT(0 To 2), Hline2ENDPNT(0 To 2) As Double 'Start and End points for Hline..
' Create block definition..
'BlockName = "Fixings_Chart"
FCBlockPNT(0) = 0: FCBlockPNT(1) = 0: FCBlockPNT(2) = 0
Set FCBlock = ThisDrawing.Blocks.Add(FCBlockPNT, "Fixings_Chart")
' Check which FIX2 is present..
If fx2CHK.Value = True Then
Hline2STARTPNT(0) = 0#: Hline2STARTPNT(1) = -10#: Hline2STARTPNT(2) = 0# 'Start point for Hline 2..
Hline2ENDPNT(0) = 90#: Hline2ENDPNT(1) = -10#: Hline2ENDPNT(2) = 0# 'End point for Hline 2..
Set Hline2 = FCBlock.AddLine(Hline2STARTPNT, Hline2ENDPNT)
End If
.....What could be causing it to spaz out? Something i'm overlooking?