Jump to content

Spiderdim lisp


Guest kruuger

Recommended Posts

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • BlackBox

    4

  • alanjt

    3

  • catoscuro

    3

  • blueshake

    1

Top Posters In This Topic

Posted Images

thank you for your share.from the show,it seems it is used find matched texts in dimension.??

yes, lisp go thru dims and mark them with lines (spider). it is much better then selection set from autocad find command and not disappear after screen regeneration.

 

kruuger

Link to comment
Share on other sites

Just curious... Why not change the color of a selection set of dims instead (no spider)?

 

(vla-put-color <object> <color>) 

 

 

Then your 'marked' selection is not lost after a regen.

Link to comment
Share on other sites

Just curious... Why not change the color of a selection set of dims instead (no spider)?

 

(vla-put-color <object> <color>) 

Then your 'marked' selection is not lost after a regen.

Personally i do not prefer any modification to drawing (like making additional layers, changing object properties until it is really necessary).

I agree that put-color will be faster but i also want play with grread. I'm still rookie with this.

 

Thanks for interesting

kruuger

Link to comment
Share on other sites

A very great work kruuger.

 

Wish you best of luck.

 

Tharwat

Thanks tharwat113.

I wish to add nested dimension or xref. But for now looks like it is beyond my lisp knowledge.

 

kruuger

Link to comment
Share on other sites

What if the text is within the Prefix/Suffix (set in style) instead of TextOverride?

aaa good catch Alan. I don't even think about this (my brain is to small).

i see what i can do with this.

 

thanks

kruuger

Link to comment
Share on other sites

Personally i do not prefer any modification to drawing (like making additional layers, changing object properties until it is really necessary).

I agree that put-color will be faster but i also want play with grread. I'm still rookie with this.

 

No worries. :)

 

Please do not misunderstand me, I have *some* proficiency using LISP, but I am a complete novice with DCL (I've never tried it!). You have done a great job in that regard.

 

Good luck!

Link to comment
Share on other sites

Bardzo ladnie Ci to wyszlo.

Very nice done. Thank you.

Haha, Dzieki :)

Thanks

 

No worries. :)

 

Please do not misunderstand me, I have *some* proficiency using LISP, but I am a complete novice with DCL (I've never tried it!). You have done a great job in that regard.

 

Good luck!

Of course not :) So I learn a lot from your LISP code many times. Any help with DCL just ask.

 

progress....

capture-8.gif

Link to comment
Share on other sites

kruuger,

I hope you don't mind and I haven't stepped on your toes (if I have I apologize and will promptly remove my snippet), but I was killing time over the weekend and thought I'd scratch this out as a very simple demo...

 

(defun c:DimSearch (/ flt lst n gr)
 ;; Alan J. Thompson, 09.27.10
 (vl-load-com)
 (if (and (/= "" (setq flt (strcase (getstring T "\nSpecify search filter: "))))
          (princ "\nSelect dimensions to search <All>: ")
          ((lambda (ss / dims ss)
             (if (setq dims (cond ((ssget '((0 . "DIMENSION"))))
                                  ((ssget "_X" '((0 . "DIMENSION"))))
                            )
                 )
               (progn
                 (vlax-for x (setq dims (vla-get-activeselectionset
                                          (cond (*AcadDoc*)
                                                ((setq *AcadDoc* (vla-get-activedocument
                                                                   (vlax-get-acad-object)
                                                                 )
                                                 )
                                                )
                                          )
                                        )
                             )
                   (if (vl-member-if
                         (function (lambda (s) (wcmatch s flt)))
                         (mapcar (function (lambda (p) (strcase (vlax-get-property x p))))
                                 '(TextOverride TextPrefix TextSuffix)
                         )
                       )
                     (setq lst (cons (trans (vlax-get x 'TextPosition) 0 1) lst)
                           ss  (ssadd (vlax-vla-object->ename x) ss)
                     )
                   )
                 )
                 (vla-delete dims)
                 (sssetfirst nil ss)
                 (ssget "_I")
               )
             )
           )
            (ssadd)
          )
          (setq n -1)
     )
   (while (and (eq 5 (car (setq gr (grread T 15 0)))) (vl-consp (cadr gr)))
     (redraw)
     (foreach p lst (grdraw (cadr gr) p 1))
   )
 )
 (redraw)
 (princ)
)

Link to comment
Share on other sites

kruuger,

I hope you don't mind and I haven't stepped on your toes (if I have I apologize and will promptly remove my snippet), but I was killing time over the weekend and thought I'd scratch this out as a very simple demo...

You guys making crazy stuff here. I always want to see another solution. There is lot to learn from your code. Maybe i can "steal" some line from your code :wink:

kruuger

Link to comment
Share on other sites

You guys making crazy stuff here. I always want to see another solution. There is lot to learn from your code. Maybe i can "steal" some line from your code :wink:

kruuger

Go for it; that's why I posted.
Link to comment
Share on other sites

Go for it; that's why I posted.

 

Isn't it wonderful...?

 

The leaves are changing... winter will be here before you know it... and Alan (this whole time) is sharing his Christmas spirit (and code) with others. :P

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 years later...

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