Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I rotate text in a block

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
I'm building a block using VBA and I'm trying to have rotated text. I have something wrong with the rotate but I can't figure it out.

Pt1(0) = 0: Pt1(1) = 0
Set objBlock = ThisDrawing.Blocks.Add(Pt1, "BLOCKNAME")
Pt1(0) = 0: Pt1(1) = 0: Pt2(0) = 0: Pt2(1) = 14.164
objBlock.AddLine Pt1, Pt2
Pt1(0) = -0.4936: Pt1(1) = 8.917
objBlock.AddText "TEXT", Pt1, 1.25
objText.Rotate Pt1, dblRotAngle
 
Replies continue below

Recommended for you

Just checking..Do you know that the angle is in radians?

"Degrees" / 180 * (Atn(1) * 4) = "Radians"

"Everybody is ignorant, only on different subjects." — Will Rogers
 
Yes, that part I remembered after seeing that the some arcs I was also working with were different that I imagined they should be.
 
I am trying to build the block in AutoCAD using VBA so I don't have to access the network and get the block from an external source. I am wanting to place attributes as well as text in the block, but they both need to be rotated in the block.
 
I dont know how to program with VBA; but your last answer suggest that the block is already made by an external source. So bring in your block, explode it, define your attributes in the rotation that you want, then use draw to make the attributed block in ACAD.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor