Results 1 to 7 of 7

Thread: Disabling OSNAPs for XREFS

  1. #1
    Wish List Administration
    Join Date
    2011-08
    Posts
    4,581

    Default Disabling OSNAPs for XREFS

    Summary: Allow OSNAPS to easily turn off and on in XREFs.

    Description: Using XREFs has changed for me because of how easy it is to find and replace files. Because I use them so much more, I would like to be able to turn XREF Osnaps off easily.

    Product and Feature: AutoCAD - XREF

    Submitted By: tysmith75746849 on 10/30/2018


  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714

    Default Re: Disabling OSNAPs for XREFS

    Might not be exactly what you're after, but would being able to enable/disable OSNAPs for entities on locked layers help?

    https://www.screencast.com/t/drl7Q16mHff


    Disregard the last bit about the getvar/setvar error, as this was done back in 2015 (2016 version) and Autodesk has since corrected that issue.

    [Edit] - I tried to upload .GIF, but when I do, it is automagically converted to .JPG which defeats the purpose (no animation), so I had to upload the video to Screencast and post a link. Grrr

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714

    Default Re: Disabling OSNAPs for XREFS

    Expanding on what I had previously done (disable snap points for locked layers), to allow XREF layer snap points to also be disabled, was easier than I thought.

    I had to revise the LAYLOCKOSNAPCTL custom system variable:
    Code:
    LAYLOCKOSNAPCTL
    
    Type:		Integer
    Saved in:	Registry
    Initial value:	0
    
    Controls object snaps for objects on locked and XREF layers:
    
    	0	Snap points for locked and XREF layers enabled (OOTB behavior)
    	1	Snap points for locked layers disabled
    	2	Snap points for XREF layers disabled
    	3	Snap points for locked and XREF layers disabled
    Yes, locking the 'nested' layers within an XREF will preclude snap points when LAYLOCKOSNAPCTL == 1, but that's also kind of cumbersome to have to do, so a simple switch case was all I needed to conditionally test for (1) LayerTableRecord.IsLocked, (2) LayerTableRecord.Name.Contains("|"), or (3) either.

    This behavior is now controlled via sysvar, which makes it really easy to setup macros, LISP, etc to perform specific tasks for our daily work.

    Please let me know your thoughts (anyone, not just Wish OP), so I can make any final changes and put an Autoloader App .bundle together.

    Cheers
    Last edited by BlackBox; 2018-10-31 at 02:39 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714

    Default Re: Disabling OSNAPs for XREFS

    Quote Originally Posted by BlackBox View Post
    Yes, locking the 'nested' layers within an XREF will preclude snap points when LAYLOCKOSNAPCTL == 1, but that's also kind of cumbersome to have to do, so a simple switch case was all I needed to conditionally test for (1) LayerTableRecord.IsLocked, (2) LayerTableRecord.Name.Contains("|"), or (3) either.
    One exception to this that I've found, is with XREF-ed Civil 3D Pipe Networks.

    I suspect it has to do with Object Layers vs Style Layers (so other AECC Objects too?), but Pipes & Structures are giving me a false reading of an AcRxObject Entity on Layer 0 (zero), instead of showing up as being a Pipe or Structure on the Object's actual Layer... Which then obeys if Layer 0 (zero) is locked, instead of as being the XREF Layer that it really is... Otherwise, this is working out quite well, particularly with SincPac's PARCELOFFSET Command in Civil 3D (yet to find an issue with vanilla AutoCAD Objects).

    More information is needed.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Member
    Join Date
    2015-11
    Location
    Jacksonville, FL
    Posts
    9

    Default Re: Disabling OSNAPs for XREFS

    Was there ever released for use?

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714

    Default Re: Disabling OSNAPs for XREFS

    Quote Originally Posted by Gambit80 View Post
    Was there ever released for use?
    Nah, you're the first person (here at AUGI) to even reply to this thread, so I wasn't sure that anyone was interested.

    I've been using this since developing it back in 2016 version, as shown in the post #2 link above.

    If enough folks actually want something like this, I'll publish it.

    Cheers

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2022-06
    Posts
    1

    Default Re: Disabling OSNAPs for XREFS

    Quote Originally Posted by BlackBox View Post
    Nah, you're the first person (here at AUGI) to even reply to this thread, so I wasn't sure that anyone was interested.

    I've been using this since developing it back in 2016 version, as shown in the post #2 link above.

    If enough folks actually want something like this, I'll publish it.

    Cheers

    Cheers
    Dear Mr.BlackBox

    I found your comments on disabling the Xref snapping.
    I am using Autodesk Plant 3D , and very often I xref some 3d models in my 3d files.
    For example routing pipes and xref some equipment. Usually the equipment are quite complex with thousands of points to snap.
    It will be really helpful if i can disable the snap on Xref items. I have tried the method for placing the XREF in the Defpoints layer and then Freeze the 0 layer, but the snap still works on the Xrefs.
    You mentioned that you have your own variable "LAYLOCKOSNAPCTL".
    Do you think this will work for me?
    Also, do you share this variable , or I have to pay (if Yes, please let me know the price).
    Thank you in advance

    BR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •