Jump to content

Auto dimension of polylines/lines


rk25134

Recommended Posts

Need a lisp for dimensioning of points/segments from a select object(need both dimensions). Please find the attached snapshot .

test.jpg

Edited by rk25134
Link to comment
Share on other sites

  • Replies 36
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    13

  • rk25134

    7

  • danielk

    4

  • mariarfd

    4

Top Posters In This Topic

Posted Images

See Tharwat I am a beginner. You people has to encourage to learn more. Instead of encouraging your are saying wasting time.

 

rk25134, I am also newbie like you.

In my observations, the member Tharwat has been quite helpful to you. I must emphasize that Tharwat is one of the most active forum guys here and he always encouraged me.

That way he will not feel encouraged to help him again. ;)

Link to comment
Share on other sites

See Tharwat I am a beginner. You people has to encourage to learn more. Instead of encouraging your are saying wasting time.

 

I did work quite hard and followed your previous thread to become with a very fruitful result but you did ignore my last two replies besides that you've been singing on another far tree which would not be helpful either to you and for user whom willing to understand the idea of your goal to help you with it .

 

if you did find that I am not encouraging you , that is because you are not following your thread very well and do not have a clear goal of any code .

 

rk25134, I am also newbie like you.

In my observations, the member Tharwat has been quite helpful to you. I must emphasize that Tharwat is one of the most active forum guys here and he always encouraged me.

That way he will not feel encouraged to help him again. ;)

 

Thank you Luis for the nice description and for the nice words , Greatly appreciated . :thumbsup:

Link to comment
Share on other sites

Thank you for providing the routine. Please find the attached image.

 

Is this what you are after ?

 

(defun c:DoDim (/ *error* c s ss)
 ;;     Tharwat 17. Jan. 2014        ;;
 (defun *error* (u)
   (if c
     (setvar 'CMDECHO)
   )
   (princ "\n*Cancel*")
 )
 (if (and (progn
            (princ "\n Select a single LINE only ...")
            (setq c (getvar 'CMDECHO)
                  s (ssget "_+.:S:E:L" '((0 . "LINE")))
            )
          )
          (progn
            (princ "\n Select a single LWPOLYLINE only ...")
            (setq ss (ssget "_+.:S:E:L" '((0 . "LWPOLYLINE"))))
          )
     )
   (progn
     (setvar 'CMDECHO 0)
     (foreach x (mapcar 'cdr
                        (vl-remove-if-not
                          (function (lambda (p) (eq (car p) 10)))
                          (entget (ssname ss 0))
                        )
                )
       (command "_._dimaligned"
                "_none"
                x
                "_none"
                (vlax-curve-getclosestpointto (ssname s 0) x)
                "_none"
                x
       )
     )
     (setvar 'CMDECHO c)
   )
 )
 (princ)
)
(vl-load-com)

Link to comment
Share on other sites

It's posts and threads like the ones in this particular page that are quite upsetting.

Come to the forums, ask for help, refuse to answer questions, completely disregard completed routines posted, and create duplicate posts in other forums where the OP does the same, ignoring anything not a full routine.

What an ungrateful noncoder, hate seeing guru's time wasted.

Not to say yours was, Tharwat, but it is quite frustrating when people like you try to help people like OP.

I echo Luis' sentiments regarding your ability and just wish people didn't come here with their hand held out expecting to have routine dropped into it without even reading other person's posts or questions they need answer in order to help.

How downright selfish

Link to comment
Share on other sites

Yes , you are correct bhull1985 and that's why I sometimes remove my codes that I post to OPs that do not pay attention to what have been received to them without even a simple reply .

 

I mostly like the active threads between any OP with the many lisp gurus here which usually threads like that would force all users to give their best and being very fruitful posts indeed at last .

 

Thank you . :)

Link to comment
Share on other sites

  • 6 months later...
Is this what you are after ?

 

(defun c:DoDim (/ *error* c s ss)
 ;;     Tharwat 17. Jan. 2014        ;;
 (defun *error* (u)
   (if c
     (setvar 'CMDECHO)
   )
   (princ "\n*Cancel*")
 )
 (if (and (progn
            (princ "\n Select a single LINE only ...")
            (setq c (getvar 'CMDECHO)
                  s (ssget "_+.:S:E:L" '((0 . "LINE")))
            )
          )
          (progn
            (princ "\n Select a single LWPOLYLINE only ...")
            (setq ss (ssget "_+.:S:E:L" '((0 . "LWPOLYLINE"))))
          )
     )
   (progn
     (setvar 'CMDECHO 0)
     (foreach x (mapcar 'cdr
                        (vl-remove-if-not
                          (function (lambda (p) (eq (car p) 10)))
                          (entget (ssname ss 0))
                        )
                )
       (command "_._dimaligned"
                "_none"
                x
                "_none"
                (vlax-curve-getclosestpointto (ssname s 0) x)
                "_none"
                x
       )
     )
     (setvar 'CMDECHO c)
   )
 )
 (princ)
)
(vl-load-com)

looked at this lisp , and thought maybe its possible to modify the routine so it works on polylines also ? i have many independent entities all of them are simple polylines (staright ,-start and end ) some of them are aligned , i have to dimension each one .

thanks !

Link to comment
Share on other sites

An alternative is to use the pline vertices rather than closestptto this way does not matter how many sections in a pline. Using intersectwith would allow for the base line to be skewed, say compare two plines or line/pline one being straight Base line for measurements a basic chainage and offset routine. Following on from the mood of posts no code.

 

Danielk big hint chainage & offset

Link to comment
Share on other sites

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