To filter a SSGET by APPIDname

To filter a SSGET by APPIDname

devitg
Advisor Advisor
1,038 Views
5 Replies
Message 1 of 6

To filter a SSGET by APPIDname

devitg
Advisor
Advisor

To filter a SSGET by APPID

How it can be filter a SSGET by is APPID name ??

 

At the dwg , that come from CADWORKS , have appid named "CPD1" and "CPD2" .
It is a pipe 3d layout .
I use it

Code:
(setq ent (ssname (ssget ":s" '(( 0 . "3DSOLID"))) 0))

(setq appid-name  (caadr(assoc -3 (entget ent (list "*")))))



Thanks in advance.

0 Likes
Accepted solutions (2)
1,039 Views
5 Replies
Replies (5)
Message 2 of 6

Ranjit_Singh
Advisor
Advisor
Accepted solution

Try below 

(ssget "X" ’((-3 ("*")))); everything with extended data
(ssget "X" ’((-3 ("CPD1,CPD2")))); only particular appids
(ssget "X" ’((0 . "3DSOLID") (-3 ("CPD1,CPD2")))); 3d solids only with certain appid

 

0 Likes
Message 3 of 6

devitg
Advisor
Advisor

Hi thanks for your help.

 

How I can use the appidname as a variable ?

 

as I told, I got the appid-name by

 

 

(setq ent (ssname (ssget ":s" '(( 0 . "3DSOLID"))) 0))

(setq appid-name  (caadr(assoc -3 (entget ent (list "*")))))

 

I try it 

 

(ssget "X" ´((0 . "3DSOLID") (-3 (appid-name ))); 3d solids only with appid as a variable 

And did not work 

 

SSGET filter , always , bother me ,specially  I can get the way when variables are used

 

I know that in this case I shall use dotted pair , but did not get  how to .

 

 

 

 

 

 

0 Likes
Message 4 of 6

Ranjit_Singh
Advisor
Advisor
Accepted solution
(setq appid-name "CPD1")
(ssget "X" (list '(0 . "3DSOLID") (list -3 (list appid-name)))); 3d solids only with appid as a variable 

Just left the computer so cannot actually test it but I believe it should work. 

Message 5 of 6

devitg
Advisor
Advisor

I will test it tomorrow , I closed my acad sesion .

0 Likes
Message 6 of 6

devitg
Advisor
Advisor

Hi , it work  as need. 

 

Thanks 

 

0 Likes