Ahankhah Posted February 11, 2012 Posted February 11, 2012 Hi everybody, as most of you know, vla-get-TextGenerationFlag function returns a number showing the condition of Upside Down and Backwards toggles inside Effects region of STYLE command's dialog. How is it possible to find out whethere Vertical toggle is ON or OFF? Quote
pBe Posted February 11, 2012 Posted February 11, 2012 Dxf 70 = 4? or are you you looking for more than just that? in Vlisp? Quote
Ahankhah Posted February 11, 2012 Author Posted February 11, 2012 Dxf 70 = 4? or are you you looking for more than just that? in Vlisp? Thank you pBe for your prompt reply. Do you know a way to use it without opening the dwg (I mean ObjectDBX)? Quote
pBe Posted February 11, 2012 Posted February 11, 2012 tblnext tblobjname Flag (= 70 4) Using our fellow member LM' ObjectDBXWrapper i'm sure you will figure it out the rest Quote
Ahankhah Posted February 11, 2012 Author Posted February 11, 2012 tblnexttblobjname Flag (= 70 4) Using our fellow member LM' ObjectDBXWrapper i'm sure you will figure it out the rest Thanks a lot pBe. I appreciate your kind help. Quote
pBe Posted February 11, 2012 Posted February 11, 2012 Something like this might help you a bit (while (setq a (tblnext "STYLE" (null a))) (if (eq (cdr (assoc 70 (entget (tblobjname "STYLE" (setq n (cdr (assoc 2 a))))))) 4) (print (strcat "Vertical Flag Found for style " n)))) HTH Quote
Lee Mac Posted February 11, 2012 Posted February 11, 2012 Firstly, thanks for the recommendation pBe, I appreciate it. Regarding your code, note that DXF Group 70 for a Text Style entity is bit-coded (in fact, Group 70 is almost always bit-coded), so you may be better to use: (= 4 (logand 4 (cdr (assoc 70 <DXF Data>)))) However, I doubt that you can use tblnext / tblobjname / tblsearch with an ObjectDBX interface, but to my knowledge, this setting is no directly accessible through ActiveX. The workaround might be: (defun _isVertical ( doc style ) (if (null (vl-catch-all-error-p (setq style (vl-catch-all-apply 'vla-item (list (vla-get-textstyles doc) style) ) ) ) ) (= 4 (logand 4 (cdr (assoc 70 (entget (vlax-vla-object->ename style) ) ) ) ) ) ) ) To pass this to my ObjectDBX Wrapper: (LM:ODBX '(lambda ( doc ) (_isVertical doc "YourStyle")) nil nil) Quote
pBe Posted February 11, 2012 Posted February 11, 2012 (edited) shoot... i'm too slow a typist. I reallize that too late when i tried to run a test. I even tried to pass the vallue thru (vl-propagate 'Val) using tblobjname but no still no joy (vlax-for txtt (vla-get-textstyles x)) (setq e (vlax-vla-object->ename txtt)) (if (eq (cdr (assoc 70 (entget (tblobjname "STYLE" (setq n (cdr (assoc 2 (entget e)))))))) 4) (progn (setq dwgwidvert (cons (list (vla-get-fullname x) n) dwgwidvert)) (vl-propagate 'dwgwidvert) ) ) ) ([b][color=blue]vlax-vla-object->ename[/color][/b] style)<----- That is what i ended up using as well.. (= 4 (logand 4 (cdr (assoc 70 <DXF Data>)))) Thank you for the clarification Cheers Edited February 11, 2012 by pBe 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.