Lee Mac Posted April 6, 2009 Posted April 6, 2009 I have used "VLA-AddText" in the past, but there seems to be no input for a choice of justification for the text you are trying to create. The text seems to always be created with a justification of bottom-left. What is the easiest way to change the justification of such text? if indeed it can be changed? As always, I thank you all for your time and patience Cheers Lee Quote
Se7en Posted April 6, 2009 Posted April 6, 2009 (vla-put-attachmentPoint (vlax-ename->vla-object (car (entsel))) acAttachmentPointMiddleLeft) Quote
Lee Mac Posted April 6, 2009 Author Posted April 6, 2009 Thanks John, I see that works with MText only - out of interest, is there an equivalent for DTEXT? Cheers Lee Quote
Lee Mac Posted April 6, 2009 Author Posted April 6, 2009 Not sure. I'll have to look. Cheers, I appreciate your time The only other method I have used in this respect is to move the text using a vector obtained from a point on the edge or the center of the box generated by the (textbox) function. - which is a bit of a hassle... Quote
Se7en Posted April 6, 2009 Posted April 6, 2009 Looks like a pain; i think what you have to do is to: Change the alignment point (Once you do this your text insertion point gets reset to 0,0 or something like that) then you need to put the text back into position. like: (vla-put-Alignment <txtobj> acAlignmentMiddle) (vla-put-TextAlignmentPoint <txtobj> (vlax-3d-point '<someptlist>)) There has to be a better way. I'll keep looking. Quote
Se7en Posted April 6, 2009 Posted April 6, 2009 ? ( (lambda (/ <txtobj> <someptlist>) (setq <txtobj> (vlax-ename->vla-object (car (entsel))) <someptlist> (vla-get-insertionpoint <txtobj>)) (vla-put-Alignment <txtobj> acAlignmentMiddle) (vla-put-TextAlignmentPoint <txtobj> <someptlist>)) ) Quote
Lee Mac Posted April 6, 2009 Author Posted April 6, 2009 Ahh I see - like having to specify the 11 DXF group code when 72 & 73 are non-zero. That looks like a better method than what I was peviously doing - thanks John. Lee 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.