As evidenced by over 30 years of development history, trust-worthy Korean CAD, CADian!
FAQ
·
2013.12.11
CADian VBA Sample Code - 1
|
---|
Private Sub CommandButton1_Click() """"CADian VBA Usage - 1 Dim pt1 As IntelliCAD.Point Dim pt2 As IntelliCAD.Point Dim pt3 As IntelliCAD.Point Dim pt4 As IntelliCAD.Point Dim myLine1 As IntelliCAD.Line Dim myLine2 As IntelliCAD.Line Dim myLine3 As IntelliCAD.Line On Error GoTo ErrorRun Me.hide Set pt1 = ThisDocument.Utility.GetPoint(, "Start point: ") Set pt2 = ThisDocument.Utility.GetPoint(pt1, "Next point-2: ") Set myLine1 = ThisDocument.ModelSpace.AddLine(pt1, pt2) myLine1.Color = vicBlue myLine1.Update Set pt3 = ThisDocument.Utility.GetPoint(pt2, "Next point-3: ") Set myLine2 = ThisDocument.ModelSpace.AddLine(pt2, pt3) myLine2.Color = vicGreen myLine2.Update Set pt4 = ThisDocument.Utility.GetPoint(pt3, "Next point-4: ") Set myLine3 = ThisDocument.ModelSpace.AddLine(pt3, pt4) myLine3.Color = vicRed myLine3.Update ErrorRun: If Err.Number <> 0 Then Err.Clear Me.Show End Sub |