도면파일(DXF 파일)에 내가 원하는 문자열을 쓰기
작성의도 : 도면 작성 자동화
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
Sub WriteDXFText(FileNumber As Integer, myText As String, Layer As String, x As Double, y As Double, z As Double, TextHeight As Double, Color As Integer, Optional Style As String = "Standard") ' 'How to use this subprocedure: 'WriteDXFText(FileNumber , "my story goes here.", "0", 10, 15, 0, 3, 1) '"Text" entity Print #FileNumber, Format(0, "@@@") Print #FileNumber, "TEXT" ' Print #FileNumber, Format(1, "@@@") Print #FileNumber, myText ' 'Style Name Print #FileNumber, Format(7, "@@@") Print #FileNumber, Style ' 'Layer Name Print #FileNumber, Format(8, "@@@") Print #FileNumber, Layer ' ' 'x coordinate of start point Print #FileNumber, Format(10, "@@@") Print #FileNumber, x ' 'y coordinate of start point Print #FileNumber, Format(20, "@@@") Print #FileNumber, y ' 'z coordinate of start point Print #FileNumber, Format(30, "@@@") Print #FileNumber, z ' 'Text Height Print #FileNumber, Format(40, "@@@") Print #FileNumber, TextHeight ' 'Text Color Print #FileNumber, Format(62, "@@@") Print #FileNumber, Color ' End Sub |