AutoCAD interop은 새 ObjectARX dll을 참조하여 액세스 할 수 있습니다. 선 그리기, 블록 추가 또는 다른 AutoCAD 기능에 대한 코드는 지난 몇 년 동안 크게 변하지 않았습니다.
당신이 VB에서 할 수있는 일의 일부는 :
자세한 정보는 AutoCAD Developer Guide
에서 찾을 수 있습니다
Imports Autodesk.AutoCAD.Interop
Imports AutoCAD
'drawing lines
'Set start point x:y:z coordinates
Dim sPoint(2) As Double 'Declare start point
sPoint(0) = X1 : sPoint(1) = Y1 : sPoint(2) = Z1
'Set end point x:y:z coordinate
ePoint(0) = X2 : ePoint(1) = Y2 : ePoint(2) = Z2
'Drawing lines
temp = ThisDrawing.ModelSpace.AddLine(sPoint, ePoint)
'changing layer for new object
temp.Layer = "LONGDASH"
'setting layer
ThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(11)
' Adding blocks
Dim dblRotate As Double
Dim temp As AcadBlockReference
'Call Block_Detector(blockName)
'convert rotation to radians
dblRotate = ThisDrawing.Utility.AngleToReal(CStr(dblRotation), AcAngleUnits.acDegrees) '* 3.141592/180#
sPoint(0) = X 'Set start point x coordinate
sPoint(1) = Y 'Set start point y coordinate
sPoint(2) = Z 'Set start point z coordinate
'Set temp = ThisDrawing.Blocks.Add(sPoint, blockName)
temp = ThisDrawing.ModelSpace.InsertBlock(sPoint, blockName, 1, 1, 1, dblRotate)