Bill,
Aside from your question, have a think about what this expression is doing:
Code:(handent (cdr (assoc 5 (entget (entlast)))))
Registered forum members do not see this ad.
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).
Today I was asked if we could rotate the dimension 90° counterclockwise so I tried this:Code:(vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "TextOverride" "<>\\PFRAME OPENING")
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:Code:(vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "Rotation" (dtr -90.0))
but no such luck. I end up with:Code:(vlax-put-property (vlax-ename->vla-Object (handent (cdr (assoc 5 (entget (entlast)))))) "Textposvert" "Above")
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.
It's deja vu, all over again.
Bill,
Aside from your question, have a think about what this expression is doing:
Code:(handent (cdr (assoc 5 (entget (entlast)))))
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
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!
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Did you resolve this Bill, or have I wasted my time?
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Registered forum members do not see this ad.
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.
It's deja vu, all over again.
Bookmarks