Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

To filter a SSGET by APPIDname

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
devitg
964 Views, 5 Replies

To filter a SSGET by APPIDname

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.

5 REPLIES 5
Message 2 of 6
Ranjit_Singh2
in reply to: devitg

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

 

Message 3 of 6
devitg
in reply to: Ranjit_Singh2

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 .

 

 

 

 

 

 

Message 4 of 6
Ranjit_Singh2
in reply to: devitg

(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
in reply to: Ranjit_Singh2

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

Message 6 of 6
devitg
in reply to: devitg

Hi , it work  as need. 

 

Thanks 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report