Jump to content

Does someone know to get the status of DXF dictionary for "Unused Layers"?


Deby Ferdian

Recommended Posts

Does someone know to get the status of DXF dictionary for "Unused Layers"? I got Mr. Lee Mac's code was gave me an information of thawed/frozen/on/off/lock/unlock status of layers but How about an "Unused Layers"status for?

 

 




(defun [b]test[/b] ( filter / dict xdict )
 (if
   (and
     (setq xdict
       (cdr
         (assoc 360
           (entget
             (cdr
               (assoc 330
                 (entget (tblobjname "LAYER" "0"))
               )
             )
           )
         )
       )
     )
     (or
       (setq dict
         (cdr
           (assoc -1
             (dictsearch xdict "ACAD_LAYERFILTERS")
           )
         )
       )
       (setq dict
         (dictadd xdict "ACAD_LAYERFILTERS"
           (entmakex
            '(
               (0 . "DICTIONARY")
               (100 . "AcDbDictionary")
               (280 . 0)
               (281 . 1)
             )
           )
         )
       )
     )
     (not (dictsearch dict filter))
   )
   (dictadd dict filter
     (entmakex
       (list
         (cons 0 "XRECORD")
         (cons 100 "AcDbXrecord")
         (cons 280 1)
         (cons 1 filter)
         (cons 1 "#*")
         (cons 1 "3")
         (cons 1 "*")
         (cons 70 768)
         (cons 1 "*")
         (cons 1 "*")
         (list -3
           (list "ACAD"
             (cons 1000 "( NAME== \"#*\" ) and ( COLOR== \"3\" ) and LOCKED == \"FALSE\"")
           )
         )
       )
     )
   )
 )
)


(defun c:[color=red][b]TEST1[/b][/color] ()
(test "Group_1")
(princ)
)


(defun c:[b][color=red]TEST2[/color] [/b]()
(entget (cdr (assoc -1 (getlayerfilter "Group_2"))) '("*"))
(princ)
)

 

 

 


;; Layer Filter XRecord Data

The following list details the various DXF codes and values contained in the Xrecord:

1 Name of Filter
1 Layer Name
1 Color
1 Linetype
70 (Please refer further below)
1 Lineweight
1 PlotStyle

The 70 DXF code can contain one of the following numbers or an addition of them:

[b] ON/OFF[/b]
On 1
Off 3

[b] FREEZE/THAW[/b]
Freeze 4
Thaw 12

CURRENT VPORT
Freeze 16
Thaw 48

NEW VPORT
Freeze 64
Thaw 192

[b] LOCK/UNLOCK[/b]
Lock 256
UnLock 768

PLOT
Plot 1024
Don't Plot 3072

 

 

#sorry for my poor english..

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...