Eng-Tips is the largest forum for Engineering Professionals on the Internet.

Members share and learn making Eng-Tips Forums the best source of engineering information on the Internet!

  • Congratulations JStephen 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
Joined
Nov 8, 2004
Messages
129
Location
US
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
 
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.
 
why dont you make attributed blocks in ACAD.
 
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

Back
Top