See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: .ctb file location

  1. #1
    Member
    Join Date
    2002-05
    Posts
    13
    Login to Give a bone
    0

    Question .ctb file location

    in our office we have a standard .CTB for most project, but as always there are a few exceptions to the rule and we need to modify the standard CTB file for certain projects, etc... What I am wondering is can I store the modified CTB files on my computer and have the standard CTB on the network, but have AutoCAD see both location when I go to plot, so they all show up in the plot dialogue box. I want to keep them separate from each other, just in case the get erased or modified by someone else.

    cheers

  2. #2
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: .ctb file location

    Hi

    Have a browse of the following threads...

    Multiple printer configuration file search paths

    Plot table search path

    Have a good one, Mike

  3. #3
    Member
    Join Date
    2002-05
    Posts
    13
    Login to Give a bone
    1

    Default Re: .ctb file location

    cheers, MIke.

  4. #4
    Administrator richard.binning's Avatar
    Join Date
    2015-12
    Location
    In the foothills of the appalachians
    Posts
    2,261
    Login to Give a bone
    0

    Default Re: .ctb file location

    Use this to allow your users to easily find the location of their plot styles tables.

    Code:
     
    
    ;;;   FILENAME:ShowPStyles.lsp
    ;;;====================================================================
    ;;;   AUTHOR: Richard Binning   
    ;;;   DATE:  03/02/2005
    ;;;   DEVNOTE: Initial Build for AUGI Forums ()
    ;;;   MASTER: Posted to Besidethecursor ()
    ;;;   DEVNOTE: Initial Mods for 2005 Products
    ;;;
    ;;;   DISCLAIMER:
    ;;;   Permission to use, copy, modify, and distribute this software 
    ;;;   for any purpose and without fee is hereby granted, provided 
    ;;;   that the above copyright notice appears in all copies and that 
    ;;;   both that copyright notice and this permission notice appear in 
    ;;;   all supporting documentation.
    ;;;
    ;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
    ;;;   WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
    ;;;   PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
    ;;;
    ;;;====================================================================
    ;;;   DESCRIPTION: ShowPStyles.lsp - Macro to retrieve the defined AutoCAD PlotStyleTable Search path
    ;;;   Uses standard Visual Lisp methods to retrieve data
    ;;;   Launches default explorer window to selected folder
    ;;;
    ;;;   USAGE:	1.) Load this file
    ;;;   PREREQ:  Requires (vl-load-com) for visual lisp functions
    ;;;====================================================================
    (defun RLB:ShowPStyles ()
     (vl-load-com)
      (prompt "\nLaunching expected Plot Table folder window - By Richard Binning")
      (setq PStyles (vlax-get (vlax-get (vlax-get (vlax-get-acad-object) 
    		 "Preferences") "Files") "PrinterStyleSheetPath"))
      (startapp "explorer" (strcat "/n,/e," PStyles "\\" ))
      (princ)
    )
    (RLB:showPStyles)

  5. #5
    Member n.curtin's Avatar
    Join Date
    2005-07
    Posts
    15
    Login to Give a bone
    0

    Default Re: .ctb file location

    I have a similar situation. Let me explain.

    CAD users are divided into departments. Each department has its own set of pc3 and ctb files. Because they like to fiddle, they sometimes mess them up. Sometimes a person from one department needs to work on another departments drawings and needs their ctb files.

    The best way I have found of maintaining the correct files is by vb script. You could use a central location, but it can be slow on a big network.

    In order to maintain consistency and ease of management, each department head has submitted their standard ctb and pc3 files to me. I have put the files on the server and split them up by department. Each department has 2 folders, Plotters and Plot Styles. Using a simple vb script and robocopy (found on the server os cd or from MS). Every time a user logs on the robocopy checks their ctb and pc3 files. If they are exactly like the server copy then nothing happens. If they are different in any way, they are overwritten by robocopy.

    This solves the problem of deploying a new/revised ctb or pc3 file/s to many users. If they mess up their files, a solution is just a click away. Another advantage is that the files are written to the user's profile, thus they "follow" the user no matter which pc they log on to.

    To add another departments file there are shortcuts to the scripts. Just select the shortcut for Department X and you instantly have their files added to you pc. These files will be removed at next log on though. To make it "permanent" add the shortcut to Startup. The files will then be added after the first script runs.

    How does it work?

    Firstly the path to the files needs to be changed in CAD. I use the following
    Code:
    C:\Documents and Settings\<username>\Application Data\Autodesk\Plotters
    C:\Documents and Settings\<username>\Application Data\Autodesk\Plotter Styles
    The reason for putting them directly into folders in Autodesk, is that users may be using different relaeses of CAD (2005, 2005LT, 2006,.......) or even DWG Viewer.
    Last edited by n.curtin; 2005-07-16 at 07:33 AM.

  6. #6
    Member n.curtin's Avatar
    Join Date
    2005-07
    Posts
    15
    Login to Give a bone
    0

    Default Re: .ctb file location

    Here is the code used in the vb scripts for Department1 standard files:
    Code:
    'Department 1 - Standard CTB and PC3 files
    Set WshShell = WScript.CreateObject("WScript.Shell")
    
    WshShell.Run("""\\server\netlogon\robocopy.exe"" ""\\server\Plotters\Department1\Plot Styles"" ""C:\Documents and Settings\%username%\Application Data\Autodesk\Plot Styles"" /e /mir")
    
    WshShell.Run("""\\server\netlogon\robocopy.exe"" ""\\server\Plotters\Department1\Plotters"" ""C:\Documents and Settings\%username%\Application Data\Autodesk\Plotters"" /e /mir")
    Because every pc doesn't have robocopy on it (this is an add on and is not available by default) I have put the robocopy.exe file into netlogon. The e and mir swithes ensure that an exact copy of each folder is maintained on the pc. Remember that if the folders/files are identical then they are left alone (i.e.: there is not bandwidth used). The use of %username% will work out the username of the user logged on.

    A shortcut to this script is made available on the desktop of the user. At anytime they can hit it and their files are updated. Very helpful if you want to roll out a new file.

    A GPO is written that runs this script at logon.

    We create a script and a shortcut for each department.

    A second set of scripts is written that can be used to add other deraptment. This will amke sure that any other files are left intact.

    Here is the Add Department 2 script:
    Code:
    'Department 2 - Add CTB and PC3 files - Does not delete other files
    Set WshShell = WScript.CreateObject("WScript.Shell")
    
    WshShell.Run("""\\server\netlogon\robocopy.exe"" ""\\server\Plotters\Department2\Plot Styles"" ""C:\Documents and Settings\%username%\Application Data\Autodesk\Plot Styles"" /e")
    
    WshShell.Run("""\\server\netlogon\robocopy.exe"" ""\\server\Plotters\Department2\Plotters"" ""C:\Documents and Settings\%username%\Application Data\Autodesk\Plotters"" /e")
    We remove the mir (purge and mirror) switch off the end of the commands. That way, what ever files are in the folders, are not overwioverwrittenutting a shortcut on the desktop, a user can add any Department's files at any time. They will "dissapdisappearext logon.To make it more permanent, put the shortcut in the Startup.

    BEWARE, running the first script will clear out the files on the computer and replace them. Running the second script will add files.
    Last edited by n.curtin; 2005-07-16 at 07:35 AM.

Similar Threads

  1. Print Spooler File Location or Printer Description File Search Path?
    By archer1684 in forum CAD Management - General
    Replies: 4
    Last Post: 2011-04-14, 07:13 PM
  2. Building file "place & location" doesn't match linked file?
    By patricks in forum Revit Architecture - General
    Replies: 2
    Last Post: 2010-11-08, 02:03 PM
  3. File naming and file location
    By Max Lloyd in forum Revit Architecture - General
    Replies: 9
    Last Post: 2005-11-03, 11:00 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
  •