Bill Tillman Posted April 27, 2012 Share Posted April 27, 2012 A few months ago after much hair pulling and some advice here and there I came up with this nice snippet which changes the TextOverride for a dimension that is the (entlast). (vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "TextOverride" "<>\\PFRAME OPENING") Today I was asked if we could rotate the dimension 90° counterclockwise so I tried this: (vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "Rotation" (dtr -90.0)) and bingo, it worked like Lee-Mac or Fixo had written it themselves for me. The request also came to adjust the Text vert pos to "Above" instead of "Centered". So I thought cool, I'll just try it like this: (vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "Textposvert" "Above") but no such luck. I end up with: Error: ActiveX Server returned the error: unknown name: Textposvert I tried all kinds of variations for Textposvert, (Text Pos Vert, posvert, pervert....) anything to see what might work. But so far nothing is working. I was hoping this would be just as straight forward as the first solution. This is for my totally automated process...no user input is allowed, only code for a solution. Any suggestions would be appreciated. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 27, 2012 Share Posted April 27, 2012 Bill, Aside from your question, have a think about what this expression is doing: (handent (cdr (assoc 5 (entget (entlast))))) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 27, 2012 Share Posted April 27, 2012 You receive the error because a Dimension object does not have the property 'textposvert'. If you are planning on just guessing the names of properties that VLA-Objects possess, then prepare for a long time spent pulling your hair out... Instead, consider using the vlax-dump-object function in conjunction with the ActiveX & VBA Reference as part of the Visual LISP IDE Help Docs. After a quick check with the above function, I can see that the property you require is the TextGap property. However, note that this will be applied as a Dimension Style Override! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 2, 2012 Share Posted May 2, 2012 Did you resolve this Bill, or have I wasted my time? Quote Link to comment Share on other sites More sharing options...
Bill Tillman Posted May 4, 2012 Author Share Posted May 4, 2012 Lee, I appreciate your interest. I've been distracted with some new assignments this week and some health issues. I plan to get back on this by Monday. The users are presently satisfied but that won't last long. Thanks again. Quote Link to comment Share on other sites More sharing options...
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.