Jump to content

assoc code (60 . 0) make objects invisible


LauKwokFai

Recommended Posts

I have this CAD file showing a general layout plan, when I checking the drawing, I found there were lots of "invisible" objects in my drawing. (for example it tells me there are 165 objects in "g-str" layer, but I only see 3 objects on screen). At last I found that those "invisible" objects has an additional assoc code (60 . 1). It became "visible" when I change it back to (60 . 0). Check the objects again the (60. 0) has gone.

 

can somone tells me what had happened to my drawing ? or it is a new feature of autocad and may be I accidentally put the objects into invisible.

 

Thanks so much !!

Link to comment
Share on other sites

The ability to make entities visible/invisible (regardless of layer settings) has been with AutoCAD for some time, though never available through standard commands; only through programming (Lisp, VBA, ARX, .NET, etc.).

 

I’ve seen a few Lisps routines around that perform that function, and I posted a VBA version here:

 

http://www.cadtutor.net/forum/showpost.php?p=85361&postcount=5

 

 

The UnHideAll sub, or similar Lisp (if one can be found), should quickly reveal all invisible objects (again, layer settings notwithstanding).

Link to comment
Share on other sites

Actually, I should mention that some of the AutoCAD verticals (Architect, Mechanical, Electrical, etc.) may have the ability to modify an entity's visibility.

Link to comment
Share on other sites

I really doubt it, we are a small interior design company, no one in this office knows Lisp, some of them don't even heard of Autolisp !!

 

Is it can only be done on purpose ?

Link to comment
Share on other sites

  • 2 years later...
I have this CAD file showing a general layout plan, when I checking the drawing, I found there were lots of "invisible" objects in my drawing. (for example it tells me there are 165 objects in "g-str" layer, but I only see 3 objects on screen). At last I found that those "invisible" objects has an additional assoc code (60 . 1). It became "visible" when I change it back to (60 . 0). Check the objects again the (60. 0) has gone.

 

can somone tells me what had happened to my drawing ? or it is a new feature of autocad and may be I accidentally put the objects into invisible.

 

Thanks so much !!

 

hi LauKwokFai,

 

i know this is a very old thread - i was just wondering if you could please tell me how you checked and changed the value of DXF code 60?

 

Cheers

Link to comment
Share on other sites

lamensterms,

 

One way of doing it without even knowing lisp is to DXFOUT the drawing. Open the DXF file in Notepad then find and replace (60 . 0) with (60 . 1) or the other way around.

 

Try it on a junk drawing first.

Link to comment
Share on other sites

  • 1 year later...
hi LauKwokFai,

 

i know this is a very old thread - i was just wondering if you could please tell me how you checked and changed the value of DXF code 60?

 

Cheers

 

Hi lamensterms,

 

Happened to look back at my old threads and see this old thread !

 

I tried to erase everything and purge a layer, it said there were objects in the layer. Then I used (ssget "x" (list (cons 8 "layerName"))) to select all objects, took (assoc 10) and (assoc 11) of every objects and draw a line, it turned out a whole structural plan. Then I (entget) a hidden object, compared it with normal object and found there is an extra (60 . 1). Didn't know what to do and tried to replace (60 . 1) by (60 . 0) and the objects became visiable.

 

As I said it is very strange because this is our company internal drawing, nothing imported from other company and no one in our office knows anything about autolisp. I still cannot figure out how this happened.

Link to comment
Share on other sites

Try this not tested

 

(setq ss (ssget "X"))
(setq len (sslength ss))
(repeat len
(setq en1 (ssname ss (setq len (- len 1))))
       (setq el1 (entget en1))
       (setq el (subst (cons 60 0) (assoc 60 el1) el1))
       (entmod el)
    
) 

Link to comment
Share on other sites

Since this has been reactivated...

 

Newer versions of AutoCAD have HideObjects, IsolateObjects, and UnIsolateObjects.

 

Another variation using AutoLISP (be sure you run the very first line):

 

  (vl-load-com)
(defun C:Cloak (/ selset index)
 (prompt "Select objects to cloak...")
 (setq selset (ssget) index (sslength selset))
 (repeat index (vla-put-Visible
     (vlax-ename->vla-object (ssname
       selset (setq index (1- index))
     )                       )
     :vlax-false
 )             )
 (princ)
)

(defun C:DeCloak (/ selset index)
 (setq selset (ssget "X" '((60 . 1))) index (sslength selset))
 (repeat index (vla-put-Visible
     (vlax-ename->vla-object (ssname
       selset (setq index (1- index))
     )                       )
     :vlax-true
 )             )
 (princ)
)

Link to comment
Share on other sites

Nice one neophoilbe thats why I am moving more to vl you can get to the properties a lot easier I wondered about visibility when I posted meant to do a couple of dumpit's.

 

Line ; Visible = -1

Link to comment
Share on other sites

Thanks, BIGAL. Actually, I'm just piggybacking off some of the work of some others. I just rearranged it, made it a bit more AutoCADish, and a bit harder to read;); and of course the naming is in honor of one of my old favorites.:D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...