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

Group Code 330

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
564 Views, 4 Replies

Group Code 330

Below are the group codes for a hatch object. The first code 330, I'm not
sure what this represents. However, the second code 330... (330 .
name: 40032130>) ...Is the associated region object, which I am trying to
access.

I use... (setq getx (cdr (assoc 330 (entget (ssname vergetdxf 0))))) ... to
access the entity name but it always returns the first 330 entity and not
the second. How do I access the second?

((-1 . ) (0 . "HATCH") (330 .
4008ecf8>)(5 . "9F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0")
(100 .
"AcDbHatch") (10 0.0 0.0 0.0) (210 0.0 0.0 1.0) (2 . "ANSI31") (70 . 0) (71
. 1) (91 . 1) (92 . 1) (93 . 4) (72 . 1) (10 23.3562 3.37284 0.0) (11
25.0247
3.37284 0.0) (72 . 1) (10 25.0247 3.37284 0.0) (11 25.0247 4.90168 0.0) (72
. 1) (10 25.0247 4.90168 0.0) (11 23.3562 4.90168 0.0) (72 . 1) (10 23.3562
4.90168 0.0) (11 23.3562 3.37284 0.0) (97 . 1) (330 .
40032130>)(75 . 0) (76 . 1) (52 . 0.0) (41 . 1.0) (77 . 0) (78 . 1) (53 .
0.785398)(43 .
0.0) (44 . 0.0) (45 . -0.0883883) (46 . 0.0883883) (79 . 0) (98 . 1) (10 0.0
0.0 0.0))

Thank you,
Edward
4 REPLIES 4
Message 2 of 5
BillZ
in reply to: Anonymous

This is the way I did it to find all the groups in a dictionary:

(while (member (assoc 330 grp) grp)
(setq glt (append glt (list (cdr (assoc 330 grp))))
grp (cdr (member (assoc 330 grp) grp)) ;list of associated groups.
)
) ;end while
BillZ
Message 3 of 5
Anonymous
in reply to: Anonymous

I'm a little lost with this one...


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
This
is the way I did it to find all the groups in a dictionary:

(while (member (assoc 330 grp) grp)

              (setq
glt (append glt (list (cdr (assoc 330 grp))))

                    grp
(cdr (member (assoc 330 grp) grp)) ;list of associated groups.

              )

          ) ;end while

BillZ

Message 4 of 5
BillZ
in reply to: Anonymous

GRP is the association list of the hatch object you described. this loop will return a list of all assoc 330s' in the association list. you can then select the one you want from the list to get the information you want with the entget function.
BillZ
Message 5 of 5
Anonymous
in reply to: Anonymous

Got it!

 

Thanks for your help.

 

I wound up using this:

 

 

 

  (while (member (assoc 330 grp) grp)

            
(setq glt (list (cdr (assoc 330 grp)))

                   
grp (cdr (member (assoc 330 grp) grp)) ;list of associated groups.

             

  ) ;end while

 

 

 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
GRP
is the association list of the hatch object you described. this loop will
return a list of all assoc 330s' in the association list. you can then select
the one you want from the list to get the information you want with the entget
function.
BillZ

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

Post to forums  

Autodesk Design & Make Report

”Boost