Tharwat Posted March 6, 2013 Posted March 6, 2013 Both lisp were works for me. Thanks for your try mohdtm . Appreciated a lot . Quote
haisagiviz Posted May 31, 2019 Posted May 31, 2019 I also test the lisp, that work but just pick one by one, cannot multiple to do that. - Could you please help me make a lisp to explode (extract) the ext line of dimension to Line object? - Because my issue is have a lot of dimension style is generated from BIM software with variable ext line (on off setting style) and they is very odd when edit any propeties or do a command to dimensions. -> I want to change all generated_dim_style_01 ~ 20 (variable ext line length is generated as one dim style) to one Standard Dim Style of AutoCAD, so no problem when I edit them. But I cannot make a lisp to do this automatically. Very grateful with any help from you. @Tharwat @Lee Mac Regard, Dimension Issue.dwg Quote
haisagiviz Posted June 3, 2019 Posted June 3, 2019 Hi @Roy_043 Because my big problem is above. Can you give me any advice? Thank you. Quote
Roy_043 Posted June 3, 2019 Posted June 3, 2019 https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/AutoCAD-Core/files/GUID-A31420D1-C876-47A5-ACAF-C7DC4F0B3E9E-htm.html Quote
haisagiviz Posted June 3, 2019 Posted June 3, 2019 Thank @Roy_043 I tried to use Update DIM tool but my case's DIM style is variable in ext line length and when change all DIM at the same time , the result is not expected. Can you download and test my attached file? Thank you so much for your support. Regards. Quote
Roy_043 Posted June 3, 2019 Posted June 3, 2019 @haisagiviz Every dimension relies on a block that contains all its graphical information. Whenever you change a dimension a new block is created based on the settings of the dimstyle. If the original dimension block was based on the same settings, this is usually the case of course, the updated dimension will look as expected. In your dwg however the original dimension blocks are not based on the settings in the dimstyle. And dimensions that seem to have overrides for the extension lines in fact do not. This makes manipulating these dimensions much harder. I advise you to apply a new dimstyle without extension lines. Anything beyond that is a waste of effort IMO. 1 Quote
Roy_043 Posted June 3, 2019 Posted June 3, 2019 @haisagiviz BTW: you should have started a new topic for your problem. 1 Quote
haisagiviz Posted June 3, 2019 Posted June 3, 2019 (edited) @Roy_043 Thank for your advice. I will start a new topic to solve this problem. If it can be, I want to extract all of ext line of dimension as line element. And then change all dimensions to new dim Standard style without ext line properties. Please give me advice can it be extract ext line of dimension? Edited June 3, 2019 by haisagiviz Quote
Roy_043 Posted June 3, 2019 Posted June 3, 2019 In theory you might be able to analyze the content of each dimension block and thereby determine the presence of extension lines 1 and/or 2. But this would be quite hard as for some bizarre reason the content of the dimension blocks in your dwg is not consistent. In some cases a single dimension block will contain the dimension texts and/or line work for two neighboring dimensions for example. You should follow my earlier advice. And if you really want to see extension lines you can apply 'manual' overrides. 1 Quote
haisagiviz Posted June 4, 2019 Posted June 4, 2019 Thank you so much. Maybe I will follow your lisp to change all to new dim style without ext line. P/S: Can you help me create a lisp to select all of dimension with condition (like as quick select tool) automatically (not select by mouse) - Then change all to a dim style (I used to see a lisp to auto create dim style). - Then use quick select tool to filter all dimension with Measuring = 0 > Delete. - Finally set new dim style as current. I will learn from it to begin my Lisp study. Thank you so much. You are amazing. Regards. Quote
sbcadguy Posted February 24, 2020 Posted February 24, 2020 On 2/28/2013 at 2:31 PM, Lee Mac said: Try this: (defun c:extlt ( / ent enx ltp obj pnt ) (setq ltp "CENTER") (if (tblsearch "LTYPE" ltp) (progn (while (progn (setvar 'errno 0) (setq ent (entsel "\nSelect Extension Line: ")) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again.") ) ( (null ent) nil) ( (not (wcmatch (cdr (assoc 0 (entget (car ent)))) "*DIMENSION")) (princ "\nSelected object is not a Dimension: ") ) ) ) ) (if ent (progn (setq pnt (trans (cadr ent) 1 0) enx (entget (car ent)) obj (vlax-ename->vla-object (car ent)) ) (vlax-put-property obj (if (< (distance pnt (cdr (assoc 13 enx))) (distance pnt (cdr (assoc 14 enx)))) 'extline1linetype 'extline2linetype ) ltp ) ) ) ) (princ (strcat "\nLinetype " ltp " not loaded.")) ) (princ) ) (vl-load-com) (princ) Is it possible to modify this code to change the arrowhead and the ltype for the picked extension line? 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.