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

Does XREF/BLOCK have Boundary

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
607 Views, 5 Replies

Does XREF/BLOCK have Boundary

How can you test if an Xref or Block Insert has been xclipped with a Boundary?

I don't see any difference in the 70 or 71 flags.

Thanks.

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

This should work.  Haven't used it since I wrote it, as it wouldn't work for what I wanted, but it will return the boundry of a xclip if it has one.

 

(defun GetSpatialFilter (ename / Data Dict tempDict)
    ; Get the xclip boundry
    
    (if
        (and
            (setq Data (entget ename))
            (setq Dict (cdr (assoc 360 Data)))
            (setq tempDict (dictsearch Dict "ACAD_FILTER"))
            (setq tempDict (dictsearch (cdr (assoc -1 tempDict)) "SPATIAL"))
        )
        (cons '(0 . "SPATIAL_FILTER") (member (assoc 100 tempDict) tempDict))
    )
)

Message 3 of 6
Anonymous
in reply to: Anonymous

Thanks this works perfectly.

As a side note, can the same be used to test if a clip boundary exists for Image, DGN, DWF, PDF ?

Message 4 of 6
Anonymous
in reply to: Anonymous

Don't know.  Don't really work with them, but I would think that you could test them with the program, and see what is returned.  It wouldn't harm any entity, as it is just looking at stuff.

 

You're welcome.

Message 5 of 6
Anonymous
in reply to: Anonymous

Nope, your routine did not work for the other object types.  Too bad.  Thanks anyways.

Message 6 of 6
Anonymous
in reply to: Anonymous

Looks like for images you have to look at dxf codes 13 ( size of the image ) and 14 ( points of clipping ) and compare them, because even when I inserted an image, it has dxf codes 14, so it seems they are always clipped.  But if code 91 is greater than 2, then there is some real clipping for sure, but the clipping could be the whole size of the image.

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

Post to forums  

Autodesk Design & Make Report

”Boost