Results 1 to 3 of 3

Thread: Overriding the HPLAYER value in a custom hatch tool

  1. #1
    Member
    Join Date
    2015-11
    Posts
    4
    Login to Give a bone
    0

    Default Overriding the HPLAYER value in a custom hatch tool

    Hi there, a little help on this matter much appreciated.

    I am setting up a CAD standard dwg file at the office, and I have created a tool palette with some custom hatches.
    Each tool inserts its hatch pattern onto a specific layer (e.g concrete hatch on A-PATT_CONC, blockwork hatch on A-PATT_BLOK, etc....)

    I set HPLAYER to A-PATT so that every new hatch created in the file will automatically go to that layer (trying to avoid hatches on wrong layers!)

    The problem i am now facing is that the new HPLAYER value is overriding my hatches in the tool palette, and any hatch created from the tool palette is automatically going to A-PATT regardless of the layer setting in each tool.

    Is there any way to get my hatch tools to ignore/override the HPLAYER value? I tried using layer keys but it seems hathces are not AEC objects.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Overriding the HPLAYER value in a custom hatch tool

    If the Hatch Palette items are configured to go onto the correct layers, then there's no need for you to modify HPLAYER sysvar... The use of the Palette will handle the layering for you.

    If you're also trying to account for users ignoring the Palette, and invoking the HATCH Command instead, simply add a Command Reactor via LISP to store then set HPLAYER when the HATCH Command begins, and restore HPLAYER when the Command ends.


    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
    Member
    Join Date
    2015-11
    Posts
    4
    Login to Give a bone
    0

    Default Re: Overriding the HPLAYER value in a custom hatch tool

    Not very capable with lisp yet but will research command reactors. Thank you!

Similar Threads

  1. Hatch Multiple Areas with Tool Pallette Hatch
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-01-16, 04:51 AM
  2. How custom tool button images are created for tool palettes
    By Mike.Perry in forum AutoCAD Tips & Tricks
    Replies: 6
    Last Post: 2012-10-09, 02:44 PM
  3. Custom Schematic Styles into Custom Tool Palettes
    By paul_mep in forum AMEP General
    Replies: 5
    Last Post: 2008-02-08, 04:53 AM
  4. Get custom hatch patterns to show on Custom tab in Hatch dialog box
    By bberghahn in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-11-07, 08:17 AM
  5. Hatch an object with tool palette hatch
    By chuck_cantieny in forum AutoCAD General
    Replies: 1
    Last Post: 2004-06-17, 03:02 PM

Tags for this Thread

Posting Permissions

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