Jump to content

export layer filters


svorgodne

Recommended Posts

Hello everyone,

 

Do u have any idea how to export filter layers from one drawing to a completely new one?

 

I think so far this little routine is collecting all layer filters

(vl-catch-all-apply
  (function 
    (lambda () 
      (vla-item 
        (vla-getextensiondictionary 
          (vla-get-layers 
            (vla-get-activedocument 
              (vlax-get-acad-object)
            )
          )
        )
        "ACAD_LAYERFILTERS"
      )
    )
  )
)

but I don't know how to extract the information from it. Any clue?

 

Thanks in advance

 

 

Link to comment
Share on other sites

Try this .. the xrecords will be in the list 'r'.

(vlax-for x (vla-item (vla-getextensiondictionary
			(vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
		      )
		      "ACAD_LAYERFILTERS"
	    )
  (setq r (cons (vlax-vla-object->ename x) r))
)

You can also get them this way .. 3's are the names and 350's are the xrecord.

(dictsearch
  (vlax-vla-object->ename
    (vla-getextensiondictionary (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
  )
  "ACAD_LAYERFILTERS"
)

 

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