Jump to content

Recommended Posts

Posted
Both lisp were works for me.

 

Thanks for your try mohdtm .

 

Appreciated a lot . :)

  • 6 years later...
Posted

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,

 

 

01.jpg

02.jpg

Dimension Issue.dwg

Posted

Hi @Roy_043

Because my big problem is above. Can you give me any advice?

Thank you. 

Posted

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.

Posted

@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.

  • Thanks 1
Posted (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 by haisagiviz
Posted

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.

  • Thanks 1
Posted

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.

Posted

Please start a new topic for that issue.

  • Like 1
  • 8 months later...
Posted
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?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...