Jump to content
ScribbleJ

Color Table Layout (Ever wished you could see it all on one sheet?)

Recommended Posts

ScribbleJ

The attached file is for those that get CTB files from an outside source and want to see how it is laid out according to line weight and/or shading.

 

Sometimes we have to use standards for a client that has their own standards and insist that we use them. I have used this file to get familiar with their CTB file.

 

I have provided a version for 2007 file format as well as the recent 2010 file format.

700-LINE-v2007.dwg

700-LINE.DWG

Share this post


Link to post
Share on other sites
BlackBox

Building on the above post (if I may)...

 

If you've ever needed to work with multiple CTB files, be it during transition from one internal CAD Standard to another, or even with multiple client files, consider plotting their settings to a PDF that resides with Support File Search Paths (SFSP) with the same name as the Plot Style... then simply use this custom CTB Command to open the applicable PDF while working for reference:

 

(defun c:CTB  (/ _shellopen plotStyle pdf path app)
 (vl-load-com)
 (princ "\rCTB ")

 (defun _shellopen  (ext / id)
   ;; © Lee Mac, 2011
   (if (and (setq id
                   (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" ext)))
            (setq id (vl-registry-read
                       (strcat "HKEY_CLASSES_ROOT\\"
                               id
                               "\\shell\\Open\\command"))))
     (car (read (strcat "(" (vl-string-translate "\\" "/" id) ")")))))

 ;; Main code
 (if (and (setq plotStyle
                 (vla-get-stylesheet
                   (vla-item
                     (vla-get-layouts
                       (vla-get-activedocument
                         (vlax-get-acad-object)))
                     (getvar 'ctab))))
          (setq pdf (findfile (strcat (vl-filename-base plotStyle) ".pdf"))))
    (progn
      (prompt (strcat "\nOpenning \"" plotStyle "\" reference... "))
      (if (setq app (_shellopen ".pdf")) (startapp app pdf)))
    (prompt "\n** Unable to reference current plot style ** "))
 (princ))

 

** Note- This works per tab, so even when using a multi-tabbed Document, simply switch to any tab where a different plot style is set as current, or manually change the current plot style for the active tab, and walla - a found reference PDF (with the same name as the plot style) will open for clarification.

 

HTH

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...