Results 1 to 2 of 2

Thread: Adding Custom Commands to Ribbons

  1. #1
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Adding Custom Commands to Ribbons

    I'd like to add some custom labeling commands to a ribbon. Specifically, I have several variant styles for labeling a structure in plan view. To get these added to the drawing, I have to go through the Annotate Ribbon and pull up the Add Labels dialog. On Add Labels, I have to drill down through Feature, Label Type and Structure Label Style.

    The command that drives adding a label to a structure in plan view is ADDNETWORKPARTPLANLABEL. Are there parameters I can give it from with a ribbon to do the drill-down for me?

    Any help would be greatly appreciated.

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

    Default Re: Adding Custom Commands to Ribbons

    Quote Originally Posted by dpresley58437170 View Post
    I'd like to add some custom labeling commands to a ribbon. Specifically, I have several variant styles for labeling a structure in plan view. To get these added to the drawing, I have to go through the Annotate Ribbon and pull up the Add Labels dialog. On Add Labels, I have to drill down through Feature, Label Type and Structure Label Style.

    The command that drives adding a label to a structure in plan view is ADDNETWORKPARTPLANLABEL. Are there parameters I can give it from with a ribbon to do the drill-down for me?

    Any help would be greatly appreciated.
    Why not just add a new Command Alias for ADDNETWORKPARTPLANLABEL to Acad.pgp file (at the bottom)?

    Code:
    (defun c:PGP (/ file)
      (if (setq file (findfile "acad.pgp"))
        (startapp "explorer" file)
        (prompt "\n** File not found ** ")
      )
      (princ)
    )
    "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

Similar Threads

  1. Custom commands
    By cmason.82472 in forum AutoCAD Customization
    Replies: 15
    Last Post: 2016-10-26, 02:16 PM
  2. Adding multiple new user commands to CUI
    By ian.cook in forum AutoCAD CUI Menus
    Replies: 3
    Last Post: 2008-07-08, 08:12 PM
  3. CUI Doesn't like my Custom Commands
    By ccaron in forum AutoCAD CUI Menus
    Replies: 4
    Last Post: 2007-08-03, 07:17 PM
  4. Adding shell commands to Acad.pgp via command alias editor
    By kgray.65984 in forum AutoCAD Customization
    Replies: 6
    Last Post: 2004-10-01, 05:22 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
  •