엑셀하고 캐드를 링크해서 VBA 처음으로 작성하고 있는데 막히는 부분 있어서
문의 드립니다.
엑셀의 셀의 행이 총 20개이고 이때 , 각 셀의 XYZ좌표를 불러서 연속선을
그리고 싶은데 연속선 그리기가 잘안되서요.. 어떻게 해야 될까요?
아래와 같이 단순 선분은 그리겠는데 좌표수가 많은 연속선은 못하겠어요…ㅜㅜ
FOR문을 써서 하구 싶은데… 잘몰겠어요 ㅜㅜ
도와주세효…..^^
Dim Apoint(0 To 2) As Double
Dim Bpoint(0 To 2) As Double
Dim AB선 As Object
‘extract to coordinate in excel
Apoint(0) = Cells(1, 1).Value
Apoint(1) = Cells(1, 2).Value
Apoint(2) = Cells(1, 3).Value
Bpoint(0) = Cells(2, 1).Value
Bpoint(1) = Cells(2, 2).Value
Bpoint(2) = Cells(2, 3).Value
Set AB선 = ThisDrawing.modelspace.AddLine(Apoint, Bpoint)
공유