Author Topic: ssget multiple entities and a specific extended data entity  (Read 3366 times)

0 Members and 1 Guest are viewing this topic.

csgoh

  • Newt
  • Posts: 176
I am trying to use ssget to select from the database for LWPOLYLINE or POLYLINE or LINE
POINT entities and a specific extended data entity but unsuccessful.
Below is my coding and hope to get some help.
Code: [Select]
          (setq  XdataAppName "WG_XD_PLOTNO"
                   filterlist    (list '(-4 . "<AND")
                                         '(-4 . "<OR")
                                           '(0 . "LWPOLYLINE")
                                           '(0 . "POLYLINE")
                                           '(0 . "LINE")
                                           '(0 . "POINT")
                                          '(-4 . "OR>")
                                      '(-4 . "AND>")
                                (list -3 (list XdataAppName)))
                 SS (ssget "x" FilterList)
         )

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ssget multiple entities and a specific extended data entity
« Reply #1 on: May 04, 2006, 03:56:46 AM »
I'm not near a lisp engine at the moment, but you could try something like ;-

'( (0 . "LWPOLYLINE,POLYLINE,LINE,POINT") (CONS -3 XdataAppName) )

// kwb

                                           
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: ssget multiple entities and a specific extended data entity
« Reply #2 on: May 04, 2006, 03:57:21 AM »
Try this one:
Code: [Select]
(setq XdataAppName "WG_XD_PLOTNO"
      filterlist   (list
                   '(0 . "LWPOLYLINE,POLYLINE,LINE,POINT")
                    (list -3 (list XdataAppName))
                   )
                SS (ssget "x" FilterList)
)
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: ssget multiple entities and a specific extended data entity
« Reply #3 on: May 04, 2006, 04:34:03 AM »
(setq SS (ssget "_X" (list '(0 . "PO[LI]*,L[IW]*") '(-3 ("WG_XD_PLOTNO")))))

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: ssget multiple entities and a specific extended data entity
« Reply #4 on: May 04, 2006, 05:38:08 AM »
(setq SS (ssget "_X" (list '(0 . "PO[LI]*,L[IW]*") '(-3 ("WG_XD_PLOTNO")))))

Евгений,
cool solution your filter, but doesn't work if XdName is a variable...
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: ssget multiple entities and a specific extended data entity
« Reply #5 on: May 04, 2006, 06:18:42 AM »
(setq SS (ssget "_X" (list '(0 . "PO[LI]*,L[IW]*") '(-3 ("WG_XD_PLOTNO")))))

Евгений,
cool solution your filter, but doesn't work if XdName is a variable...
I wanted to show, the working filter - as I use it...
csgoh - Itself correctly used XdataAppName!
Thank for the correction :-)
Code: [Select]
(setq SS (ssget "_X" (list '(0 . "PO[LI]*,L[IW]*") (list -3 (list XdataAppName)))))

csgoh

  • Newt
  • Posts: 176
Re: ssget multiple entities and a specific extended data entity
« Reply #6 on: May 04, 2006, 11:28:02 AM »
Thanks guys.

csgoh

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: ssget multiple entities and a specific extended data entity
« Reply #7 on: May 26, 2006, 02:44:39 AM »
Code: [Select]
(setq SS (ssget "_X" (list '(0 . "[lp]*[et]") (list -3 (list XdataAppName))))) :-)

StoneDWG

  • Guest
Re: ssget multiple entities and a specific extended data entity
« Reply #8 on: June 19, 2006, 12:42:42 AM »
How get the entities ,they have not  a specific extended data

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: ssget multiple entities and a specific extended data entity
« Reply #9 on: June 19, 2006, 04:24:42 AM »
Code: [Select]
(ssget "_X" (list '(-4 . "<NOT") (list -3 (list "*")) '(-4 . "NOT>")))or if you wanna filter objects they have no extended data with the names 'MyXdata1' 'MyXdata2':
Code: [Select]
(ssget "_X" (list '(-4 . "<NOT") (list -3 (list "MyXdata1" "MyXdata2")) '(-4 . "NOT>")))
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18