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

Just Curious About Invisible Attributes

0 REPLIES 0
Reply
Message 1 of 1
mgorecki
270 Views, 0 Replies

Just Curious About Invisible Attributes

Hello,

In one of my programs I have a section that creates a bunch of attributes and makes a block reference out of them.  It then inserts the block.  It looks like this because the ones that needed it, needed to have the default values set to certain values.

(command "attdef" "" "DSN_DRAWING_TYPE" "DSN_DRAWING_TYPE" att_Drawing_Type "0,0" "0" "") ;"UNIT ARRAY"
 (command "attdef" "" "DSN_PACKAGE_GROUP" "DSN_PACKAGE_GROUP" att_pkg_group "0,0" "0" "") ;MAF, FS, SiP
 (command "attdef" "" "DSN_STRIP_SIZE" "DSN_STRIP_SIZE" att_strip_size "0,0" "0" "") ;62, 68, or 72
:
:
:

 

  I was then asked to make sure the attributes were invisible.  So I added the following code:

  (setq Att_Block_Group (ssget "x" (list (cons 2 "DESIGN_ATTRIBUTES")))) ;gets the DESIGN_ATTRIBUTES block
  (setq Att_Block_ent (entget (ssname Att_Block_Group 0)))
  (setq sub_ent_info (entget (entnext (cdr (assoc -1 Att_Block_ent))))) ;gets info for the next subentity inside the block
  (while (/= (cdr (assoc 0 sub_ent_info)) "SEQEND")
   (setq sub_ent_info (subst (cons 70 1) (assoc 70 sub_ent_info) sub_ent_info )) ;changes the attribute to "Hidden"
   (entmod sub_ent_info)
   (setq sub_ent_info (entget (entnext (cdr (assoc -1 sub_ent_info)))))
  )

Ok so the block gets inserted, and then the attributes are turned invisible, that's great, it works.

 

The weird part is, when I use Battman and select this block, the "Mode" column shows "L".  It should show "IL" because the attributes are invisible.

Also, I edit the block and check the properties of the attributes and for Invisible it says "No".

But I still cannot see the attributes in the drawing, which is what I wanted anyway.

Does anyone know why it says the attributes are not invisible when clearly they are?

 

Thanks,

Mark

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report

”Boost