Jump to content

Recommended Posts

Posted

Thanks jt - what that mean creating several dimension styles for different scales of viewport?

Posted
Thanks jt - what that mean creating several dimension styles for different scales of viewport?

 

i am afraid so buddy. Acc to me it will be easier and faster for you.

 

But I am not an autocad expert. Maybe someone can suggest you a faster way :)

  • 1 year later...
Posted

fixo and/or Lee Mac:

I tried out both your routines and they are great. I very much appreciate the talent you guys have in coding LiSP. I took a class back in '96...hurt my brain, but at least I can follow along a bit on the easier routines.

 

With the routines you posted, I don't need the bearing, just the length of the Pline (closed or unclosed)....but more accurately with NO dimension line. Is there a way to modify either routines for a simple footage text (or footage block) to be placed parallel to a chosen Pline?

 

I'm not fussy where it's located, but ideally it would be center of line and to one side or the other (nice option to pick the side, but again, I'm not fussy at this point! Just thankful!)...Offset ~8' at text center of 8' height text. I have a routine that will convert text to block (I'm pretty sure I do anyway), so I can convert any text to the appropriate footage block (to differentiate between segments that are aerial or underground).

 

Thank you.

Posted

a request to Mircea :

after using your lisp , I do not why but is always repeating "_ select " comand :

"Command: _select

 

Select objects: !previousSelection

" it give me this mesage after each comand !

could you fix this please ( te rog )

  • 3 months later...
Posted
fixo and/or Lee Mac:

I tried out both your routines and they are great. I very much appreciate the talent you guys have in coding LiSP. I took a class back in '96...hurt my brain, but at least I can follow along a bit on the easier routines.

 

With the routines you posted, I don't need the bearing, just the length of the Pline (closed or unclosed)....but more accurately with NO dimension line. Is there a way to modify either routines for a simple footage text (or footage block) to be placed parallel to a chosen Pline?

 

 

I'm not fussy where it's located, but ideally it would be center of line and to one side or the other (nice option to pick the side, but again, I'm not fussy at this point! Just thankful!)...Offset ~8' at text center of 8' height text. I have a routine that will convert text to block (I'm pretty sure I do anyway), so I can convert any text to the appropriate footage block (to differentiate between segments that are aerial or underground).

 

Thank you.

Try here written by Stefan M. for KIM

  • 1 month later...
Posted
Try this one from my code storage

Please, if some of you experts is willing to edit code posted by fixo in a way to add ability to change side and offset distance by picking it in cad instead of manually changing it in lisp it would be perfect.

Thanks!

  • 3 months later...
Posted
Please, if some of you experts is willing to edit code posted by fixo in a way to add ability to change side and offset distance by picking it in model space, instead of manually changing it in lisp every time?! It would be perfect.

Thanks!

 

Anyone, please?!

Posted

Good time to learn lisp this line is not very hard to change to a ask question.

 

(setq gap (* (getvar "dimtxt") 2.5));

 

Hint getdist

Posted (edited)

Thank you BIGAL I realized how to change offset with getdist/getreal!:D

Can You help me make it work with more polylines?

Edited by gamulj
  • 5 months later...
Posted

Thank you ASMI!

i have a request if it's not a problem

i have a pline with short segments that i dont want to dim

there is a way that the code will show dim only greater then 5 cm?

Posted

Try the following code:

(defun c:polydim ( / cmd enx idx lbd lst off sel )

   (setq off 1.2 ;; Dimension offset factor
         lbd 5.0 ;; Dimension segments greater than this length (set to 0 to dimension all segments)
   )
   (if (setq sel (ssget '((0 . "LWPOLYLINE") (-4 . "<NOT") (-4 . "<>") (42 . 0.0) (-4 . "NOT>"))))
       (progn
           (setq cmd (getvar 'cmdecho)
                 off (* off (getvar 'dimtxt))
           )
           (setvar 'cmdecho 0)
           (repeat (setq idx (sslength sel))
               (setq enx (entget (ssname sel (setq idx (1- idx))))
                     lst (mapcar 'cdr (vl-remove-if-not '(lambda ( x ) (= 10 (car x))) enx))
               )
               (mapcar
                  '(lambda ( a b / d )
                       (if (< lbd (setq d (distance a b)))
                           (vl-cmdf "_.dimaligned" "_non" a "_non" b "_non"
                               (polar (polar a (angle a b) (/ d 2)) (+ (angle a b) (/ pi (if (< (car a) (car b)) 2.0 -2.0))) off)
                           )
                       )
                   )
                   lst
                   (if (= 1 (logand 1 (cdr (assoc 70 enx))))
                       (reverse (cons (car lst) (reverse (cdr lst))))
                       (cdr lst)
                   )
               )
           )
           (setvar 'cmdecho cmd)
       )
   )
   (princ)
)

Posted

Lee Mac thanks alot its work

can i ask another request?

i want to combine it in a larger lisp, i try to upload it and set it to chose the last pline that draw

" (load "D:\\PATH...\\POLYDIM.lsp")

(command "_.select" "_last" "")

(C: POLYDIM)"

but its not work, what i need to do?

Posted

Hi ! any way to get all dimension inside of the polyline?

  • 3 months later...
Posted

Thank you this thread wal a lot of help .

ASMI yout lisp is amazing and i've learned a lot :D

Posted

I was wondering if any one can edit the code and add and offset of 1.25 inside the line or the polylines. love the coded and works great.

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