Results 1 to 2 of 2

Thread: Tool Palette Layer Set

  1. #1
    Active Member
    Join Date
    2004-08
    Posts
    50
    Login to Give a bone
    0

    Default Tool Palette Layer Set

    Please give me some feedback on this idea. I want to add our block library to a series of tool palettes in Acad2009. I don't want to manage the insertion layers via the palette. Too time consuming and error prone. The idea:
    Create a VBA reactor to watch for 'ObjectAdded' event and if the object is a block named 'dcclpdata'. Get the EffectiveName and use that to query a database for the proper layer settings. Then take the appropriate steps to add the layer if needed and set the item to that layer. Does this make sense? Is there a better way? What is this dcclpdata block anyway? Can it be relied on in this case or is it used elsewhere....

    -mjm

  2. #2
    100 Club
    Join Date
    2005-03
    Location
    Derby, UK
    Posts
    194
    Login to Give a bone
    0

    Default Re: Tool Palette Layer Set

    Yes makes sense should be easy enough, like you say quicker than setting tool palettes too!

    Not sure what you mean by dcclpdata though?

    Private Sub AcadDocument_ObjectAdded(ByVal Object As Object)

    If TypeOf Object Is AcadBlockReference Then

    Dim blockObj As AcadBlockReference

    Set blockObj = Object

    MsgBox "You have added a block named " & blockObj.Name & "and it is currently on layer " & blockObj.layer & ". " & vbCrLf & _
    "Add some code to change the layer based upon the name!"

    End If

    End Sub

    Regards,

Similar Threads

  1. Tool palette layer vs layer in block
    By Dubweisertm in forum CAD Management - General
    Replies: 2
    Last Post: 2012-01-03, 03:52 PM
  2. Replies: 0
    Last Post: 2011-10-11, 10:00 AM
  3. Tool Palette buttons that match layer states to Layout tabs
    By Maverick91 in forum AutoCAD Customization
    Replies: 1
    Last Post: 2006-11-06, 11:05 PM
  4. Layer Filters in the Properties Tool Palette
    By .chad in forum ACA General
    Replies: 4
    Last Post: 2006-06-15, 09:54 PM
  5. Tool Palette Layer Repeat BUG
    By rkmcswain in forum AutoCAD General
    Replies: 0
    Last Post: 2005-08-09, 09:55 PM

Posting Permissions

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