After adding LayerObj to the code I began getting this error 4 the AcadDoc.SetVariable "pdmode", 34
Prior 2 adding the th above mentioned SetVariable worked fine. Any Ideas? Oh the LayerObj that I added works fine.
Private Sub Form_Load()
Top = (Screen.Height - Form1.Height) / 2
Left = (Screen.Width - Form1.Width) / 2
fraSelectFiles.Visible = True
cmdReselect.Enabled = False
lblETLabel.Visible = False
intFileSelected = 0
DoEvents
Call SetControls
Call AcadLink
Set AcadDoc = AcadApp.Documents(0)
startPoint(0) = 1#: startPoint(1) = 1#: startPoint(2) = 1#
endPoint(0) = 5#: endPoint(1) = 5#: endPoint(2) = 5#
Dbetweenpts startPoint, endPoint
Midpnt startPoint, endPoint
Set LineObj = AcadDoc.ModelSpace.AddLine(startPoint, endPoint)
Set LayerObj = AcadDoc.Layers.Add("SScrap"
LayerObj.Color = acBlue
AcadDoc.ActiveLayer = LayerObj
Set CircleObj = AcadDoc.ModelSpace.AddCircle(startPoint, Radpt)
Set ArcObj = AcadDoc.ModelSpace.AddArc(endPoint, Radpt, 1, 4)
AcadDoc.SetVariable "pdmode", 34
Set PointObj = AcadDoc.ModelSpace.AddPoint(MidPoint)
ZoomAll
End Sub
Prior 2 adding the th above mentioned SetVariable worked fine. Any Ideas? Oh the LayerObj that I added works fine.
Private Sub Form_Load()
Top = (Screen.Height - Form1.Height) / 2
Left = (Screen.Width - Form1.Width) / 2
fraSelectFiles.Visible = True
cmdReselect.Enabled = False
lblETLabel.Visible = False
intFileSelected = 0
DoEvents
Call SetControls
Call AcadLink
Set AcadDoc = AcadApp.Documents(0)
startPoint(0) = 1#: startPoint(1) = 1#: startPoint(2) = 1#
endPoint(0) = 5#: endPoint(1) = 5#: endPoint(2) = 5#
Dbetweenpts startPoint, endPoint
Midpnt startPoint, endPoint
Set LineObj = AcadDoc.ModelSpace.AddLine(startPoint, endPoint)
Set LayerObj = AcadDoc.Layers.Add("SScrap"
LayerObj.Color = acBlue
AcadDoc.ActiveLayer = LayerObj
Set CircleObj = AcadDoc.ModelSpace.AddCircle(startPoint, Radpt)
Set ArcObj = AcadDoc.ModelSpace.AddArc(endPoint, Radpt, 1, 4)
AcadDoc.SetVariable "pdmode", 34
Set PointObj = AcadDoc.ModelSpace.AddPoint(MidPoint)
ZoomAll
End Sub