Author Topic: Custom ssget function tester wanted  (Read 2453 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8790
  • AKA Daniel
Custom ssget function tester wanted
« on: July 30, 2008, 02:09:38 PM »
I thought it might be useful to have a ssget function that allows for a custom prompt similar to ARX.  Please see the ARX documentation under acedSSget and refer to  “:$ “ mode . basically it allows one of the point parameters to be used as a prompt[], so if you need a to use a point don’t use this function
I have attached an ARX for 04-06 & 07-09, please let me know how it works.  I will post the source code here http://www.theswamp.org/index.php?topic=21875.0 after its tested

Thanks
Here are a couple of samples

Code: [Select]
(CRPSSGETEX ":$" "Add: " "Remove: ")
;;;
(CRPSSGETEX ":$" "Add: " "Remove: " '((8 . "0")))
;;;
(CRPSSGETEX
  ":$"
  "Add: "
  "Remove: "
  '((0 . "LINE") (8 . "0"))
)
;;;
(CRPSSGETEX
  ":$"
  "Select a Line or PolyLine: "
  "Remove a Line or PolyLine: "
  '((8 . "0")
    (-4 . "<OR")
    (0 . "*POLYLINE")
    (0 . "LINE")
    (-4 . "OR>")
   )
)
;;;
(defun c:tcl (/ b c s)
  (vl-load-com)
  (setq s (CRPSSGETEX
            ":$"
            "Select Text or Mtext: "
            "Remove Text or Mtext: "
            '((-4 . "<OR")(0 . "DTEXT") (0 . "TEXT") (0 . "MTEXT") (-4 . "OR>"))
          )
  )
  (if s
    (progn
      (setq b (getvar "clayer")
            c 0
      )
      (While (< c (sslength s))
        (vla-put-layer
          (vlax-ename->vla-object (cdr (car (entget (ssname s c)))))
          b
        )
        (setq c (1+ c))
      )
    )
    (alert (strcat "Could Not find any Text"))
  )
  (princ)
)
« Last Edit: July 30, 2008, 11:17:26 PM by Daniel »

VovKa

  • Water Moccasin
  • Posts: 1632
  • Ukraine
Re: Custom ssget function tester wanted
« Reply #1 on: July 30, 2008, 04:16:48 PM »
thanks Daniel
but this one is not working
Code: [Select]
(CRPSSGETEX
  ":$"
  "Add: "
  "Remove: "
  '((0 . "LINE") (8 . "0"))
)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Custom ssget function tester wanted
« Reply #2 on: July 30, 2008, 09:51:07 PM »
is the coding for matchprop similar to something like this, more specifically, the part where after you select the source object, when the ssget option is active, you can also type s to access settings? i've been trying to find some documentation on an ssget option that will also let you type.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8790
  • AKA Daniel
Re: Custom ssget function tester wanted
« Reply #3 on: July 30, 2008, 11:16:38 PM »
thanks Daniel
but this one is not working
Code: [Select]
(CRPSSGETEX
  ":$"
  "Add: "
  "Remove: "
  '((0 . "LINE") (8 . "0"))
)

Thanks for testing this, I think I have it all fixed up
I have attached the new files to the first post

VovKa

  • Water Moccasin
  • Posts: 1632
  • Ukraine
Re: Custom ssget function tester wanted
« Reply #4 on: July 31, 2008, 02:34:58 PM »
everything seems to be ok.
now i've got to think what i can apply it to :)
thanks again.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Custom ssget function tester wanted
« Reply #5 on: August 05, 2008, 03:00:55 PM »
Is there any room for a wishlist?   :-)

Thinking out loud when I used one of my routines today.  It asks a question before it allows you do use the ssget, so I was wondering if you could program it so that one could use something like initget with ssget.  I don't think it is possible, but just incase it is that would be sweet.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Custom ssget function tester wanted
« Reply #6 on: August 05, 2008, 06:19:28 PM »
Is there any room for a wishlist?   :-)

Thinking out loud when I used one of my routines today.  It asks a question before it allows you do use the ssget, so I was wondering if you could program it so that one could use something like initget with ssget.  I don't think it is possible, but just incase it is that would be sweet.
precisely what i was asking, i know it has to be possible. look at matchprop, after you select your source object, you have an ssget with an option to type "s" to access settings.

can you grread with ssget to be able to just select normally with ssget, or if you start typing, it does something else?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Custom ssget function tester wanted
« Reply #7 on: August 05, 2008, 06:32:54 PM »
Is there any room for a wishlist?   :-)

Thinking out loud when I used one of my routines today.  It asks a question before it allows you do use the ssget, so I was wondering if you could program it so that one could use something like initget with ssget.  I don't think it is possible, but just incase it is that would be sweet.
precisely what i was asking, i know it has to be possible. look at matchprop, after you select your source object, you have an ssget with an option to type "s" to access settings.

can you grread with ssget to be able to just select normally with ssget, or if you start typing, it does something else?
You could use this as a starting ground.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8790
  • AKA Daniel
Re: Custom ssget function tester wanted
« Reply #8 on: August 05, 2008, 08:31:50 PM »
Is there any room for a wishlist?   :-)

Thinking out loud when I used one of my routines today.  It asks a question before it allows you do use the ssget, so I was wondering if you could program it so that one could use something like initget with ssget.  I don't think it is possible, but just incase it is that would be sweet.

It just might be possible using :K , I will take a look