Nikon Posted January 4, 2023 Posted January 4, 2023 Привет, Ли. Подскажи, пожалуйста, как с помощью Quick Field создать поле суммы нескольких текстов. 10+50+80=поле суммы Quote
Nikon Posted January 4, 2023 Posted January 4, 2023 (edited) On 1/4/2023 at 5:11 PM, Nikon said: Привет, Ли. Подскажи, пожалуйста, как с помощью Quick Field создать поле суммы нескольких текстов. 10+50+80=поле суммы %<\AcExpr (%<\_FldPtr 959588656>%+%<\_FldPtr 959592752>%+%<\_FldPtr 959592208>%)>% Edited April 1 by Nikon Quote
Kycau Posted February 22, 2023 Posted February 22, 2023 On 11/13/2015 at 6:14 PM, catopal said: Hi Lee, How can I get dynamic block user parameter value with QuickField lisp. ? %<\AcObjProp Object(%<\_ObjId 140694963280112>%).Parameter(96).UpdatedDistance \f "%lu2%pr0">% I think you can use a part of Lee Mac's code. I could adjust it to retrieve field-code of a specific attribute inside my dynamic block. In your case: Parameter(96) points to specific parameter. If you want to always retrieve field of the same parameter from different blocks, it can stay the same. What concerns parameters, the lucky thing is that ObjId of any parameter is the same as of the Insert-entity itself. I believe smth. like this should work: (strcat "%<\AcObjProp Object(%<\_ObjId " (vla-getobjectidstring (vla-get-utility (vla-get-activedocument (vlax-get-acad-object))) (vlax-ename->vla-object (car (entsel))) :vlax-false) ">%).Parameter(96).UpdatedDistance \f "%lu2%pr0">%") where: (vla-get-activedocument (vlax-get-acad-object))) is a simplification of Lee's "LM:quickfield:acdoc", which I didn't entirely understand, due to my lack of experience Maybe Lee uses it to save space ?) Quote
Lee Mac Posted February 23, 2023 Posted February 23, 2023 20 hours ago, Kycau said: (vla-get-activedocument (vlax-get-acad-object))) is a simplification of Lee's "LM:quickfield:acdoc", which I didn't entirely understand, due to my lack of experience Maybe Lee uses it to save space ?) Perhaps this post will help to shed some light 1 Quote
Kycau Posted February 23, 2023 Posted February 23, 2023 (edited) @Lee Mac Thank you Edited February 23, 2023 by Kycau Quote
enthralled Posted March 28 Posted March 28 (edited) On 2/9/2015 at 2:29 PM, Lee Mac said: (defun c:test ( ) (LM:QuickField "TextString" "%tc1" 1)) EDIT: Never mind and thanks, I found my answer here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/link-between-text-mtext-and-attribute-with-field/m-p/6265346/highlight/true#M340500 @Lee Mac Hi Lee, I need to replace the contents of a text object with multiple textstring fields separated by a delimiter "-", by selecting multiple text objects in order. E.g. If I select text1 then text3 then text2, and hit enter, i pick an existing text to replace its contents with text1-text3-text2 as fields. Is this possible with your Quick Field program? Thanks Edited March 28 by enthralled Found answer Quote
BIGAL Posted March 28 Posted March 28 (edited) It may be easier to try this expects that you are picking 3 field text objects, expects that the destination mtext exists. ; pick multi mtext and paste into another mtext ; By AlanH March 2024 (defun c:wow ( / txt1 txt2 txt3 obj4) (setq txt1 (vlax-ename->vla-object (car (entsel "Pick 1st text object ")))) (setq str (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid txt1)) ">%).TextString>%" ) ) (setq txt2 (vlax-ename->vla-object (car (entsel "Pick 2nd text object ")))) (setq str (strcat str "-" "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid txt2)) ">%).TextString>%" ) ) (setq txt3 (vlax-ename->vla-object (car (entsel "Pick 3rd text object ")))) (setq str (strcat str "-" "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid txt3)) ">%).TextString>%" ) ) (setq obj4 (vlax-ename->vla-object (car (entsel "Pick destination text ")))) (vlax-put obj4 'textstring str) (princ) ) Edited March 28 by BIGAL 2 Quote
rami_lpm Posted April 19 Posted April 19 On 2/6/2015 at 5:28 PM, Lee Mac said: You could create a program using my Quick Field utility to perform this task. Amazing! this solves a LOT of very tedious tasks. Thanks a bunch! 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.