ummar Posted March 16, 2010 Posted March 16, 2010 hi i am using autocad 2009, how can i justify some text inserted from VBA in autocad drawing. i want to make it justified MIDDLE CENTRE. Quote
MSasu Posted March 17, 2010 Posted March 17, 2010 You should insert the text entity and just after alter his alignment; the code below may clarify this: Dim myTextObject As Object Set myTextObject = ThisDrawing.ModelSpace.AddText("Hello World!", TextInsertionPoint, 1#) 'modify text alignment to Middle-Center myTextObject.Alignment = acAlignmentMiddleCenter Please check the help for the list of built-in alignment constants. Regards, Quote
Recommended Posts
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.