Jump to content

Recommended Posts

Posted

i use this code to import text, but i cant rotating text.o:)

need help from anyone.

 

 

 

 

Sub Txt()

Dim ACAD As AcadApplication

Dim txObj As acadText

Dim rotObj As AcRotationAngle

Dim ws As Range

Dim CrdNo(0 To 2) As Double

Dim TxNo As String

Dim hNo As Double

Dim angl As Double

Dim LastRow As Double

Dim i As Integer

Dim j As Integer

Dim k As Integer

 

Set ws = Worksheets("SCR").Cells

LastRow = ws(Rows.Count, 20).End(xlUp).Row

hNo = 0.3

angl = 90

For i = 2 To LastRow

CrdNo(0) = ws(i, 20): CrdNo(1) = ws(i, 21): CrdNo(2) = "0"

TxNo = ws(i, 21)

 

Set txObj = AcadApplication.ActiveDocument.ModelSpace.AddText(TxNo, CrdNo, hNo)

'Set rotObj = AcadApplication.ActiveDocument.ModelSpace.AddHatch.Rotate(CrdNo, angl)'

Next i

End Sub

 

 

 

Thanks for Help :)

Posted

Thanks RICVBA,

its Work now..

*THUMBs UP*

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...