×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How can I rotate text in a block

How can I rotate text in a block

How can I rotate text in a block

(OP)
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

RE: How can I rotate text in a block

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

RE: How can I rotate text in a block

(OP)
Yes, that part I remembered after seeing that the some arcs I was also working with were different that I imagined they should be.

RE: How can I rotate text in a block

why dont you make attributed blocks in ACAD.

RE: How can I rotate text in a block

(OP)
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.

RE: How can I rotate text in a 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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources