6 Replies Latest reply on Mar 14, 2014 2:02 PM by Steven Soeder

    Can you print a list of all file locations from settings?

    Steven Soeder

      We are updgrading existing users from 2013 to 2014 as well as adding some new users and new workstations.

      We have all of our templates for parts, BOMs, custom properties list, etc. in a central network location so we are all using the same items.

      We would like everyont to be pointing ot the same files in a central network location, however it seems that mulitple users have different setups currently.

      I'd like to put together a guide for updating and new installs that shows what all the settings should be.

      I'd like to be able to show what all the file locations are supposed to be set to.


      Is there a way to print a list of what all the file locations are set to from one computer that has been setup properly?

      I'm ok with a macro that could export to a .txt or excel or even just place it on the clipboard, but I would need help in how to do this.  I'm experienced in VB / VBA but not with the Solidworks API.

       

       

       

      Thanks!

        • Re: Can you print a list of all file locations from settings?
          Ian Worrall

          Sounds like a job for the Copy Settings Wizard.

          Create a generic user with the correct settings and import that to each new installation.

          • Re: Can you print a list of all file locations from settings?
            Scott McFadden

            Steven,

            Why not just use the copy settings wizard on the machine that is setup the way you want, then take the generated file to the new station and load it there.

              • Re: Can you print a list of all file locations from settings?
                Steven Soeder

                All the existing users have been in charge of managing their own installs for years, and while it seems at one point a move was made to try to get things like templates, toolboxes, etc. onto a primary network location everyone could access, there seems to have been multiple attempts at this, so mulitple locations exist.

                 

                I'd really like to see a list of where all the file locations are for each user currently, so we can go through and find what is being used and what should be used, and use that to commonize setup.

                 

                Once we get this established, we can use copy settings wizard to get everyone on the same page.

                  • Re: Can you print a list of all file locations from settings?
                    Anna Wood

                    Steve,

                     

                    The file the copy settings wizard saves out is just a Windows regedit file.  You can read that in Notepad.

                     

                    Get everyone's copy settings wizard file and open in notepad to see what they have setup.

                     

                    Cheers,

                     

                    Anna

                      • Re: Can you print a list of all file locations from settings?
                        John Burrill

                        The problem with the copy-settings-wizard is that it doesn't image the reference file paths.  The reason elludes me, because the paths are there in the reg file, concatonated into 1024 character chunks, but when you load it, the settings don't show up in SolidWorks.

                        I know this because I tried to do this at a couple of companies where I worked.  I wound up writing a macro to add file locations(made it capture subfolders too) but it calls a lot of VB6 era plugins so it doesn't work under Windows 7 64bit with VBA7.

                        I probably would have updated it, but PDM made network search paths obsolete.

                        BTW, if you're clever, you can store template files and other read-only assets in a workgroup PDM vault and path users to point to that.

                      • Re: Can you print a list of all file locations from settings?
                        Scott McFadden

                        This sounds like the daunting task some years ago at my old job just prior to installing the PDM.  I had to go around and print out each file directory of each user in our department and go through each comparing and determining which files should stay and which ones should go.  The ones that went I just deleted and the ones that stayed I placed in a remote network directory that eventually became part of our PDM folder structure.

                        As far as the templates, Find the one you want, remove the rest and place the ones you want to keep on a secure location that only you have access to for updating.  Then path everyone to that location.  That is the first place I would start.  At least after this task is done, all new files are being created from these new templates.

                    • Re: Can you print a list of all file locations from settings?
                      Jason Kerns

                      I had to do this once, for most settings, here is the part just for file locations.

                      P.S. Dont forget to add a reference to Microsoft Scripting Runtime

                      ' ******************************************************************************

                      ' C:\Users\JasonK\AppData\Local\Temp\swx1004\Macro1.swb - macro recorded on 10/17/13 by JasonK

                      ' ******************************************************************************

                      Dim swApp As SldWorks.SldWorks

                      Dim objFSO As Object

                      Dim txtfile As Object

                       

                       

                      Sub main()

                       

                      Set swApp = _

                      Application.SldWorks

                      Set objFSO = New Scripting.FileSystemObject

                      Set txtfile = objFSO.CreateTextFile("C:\Users\" & Environ$("Username") & "\Desktop\SW File locations.txt", True)

                       

                       

                      txtfile.WriteLine "    -FILE LOCATIONS-"

                       

                      txtfile.WriteLine "Document templates - folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDocumentTemplates)

                      txtfile.WriteLine "Referenced Documents - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDocuments)

                      'txtfile.WriteLine "Bend Table Template - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swBendTableTemplateFolders)

                      txtfile.WriteLine "Blocks - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBlocks)

                      txtfile.WriteLine "BOM Templates - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBOMTemplates)

                      txtfile.WriteLine "Color Swatches - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsColorSwatches)

                      'txtfile.WriteLine "Costing Report Template Folder - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swCostingReportFolder)

                      'txtfile.WriteLine "Costing templates - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swCostingTemplatesFolder)

                      txtfile.WriteLine "Custom - Appearances - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCustomAppearances)

                      txtfile.WriteLine "Custom - Decals - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCustomDecals)

                      txtfile.WriteLine "Custom - Scenes - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCustomScenes)

                      txtfile.WriteLine "Custom Property Files - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCustomPropertyFile)

                      txtfile.WriteLine "Design Journal Template - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDesignJournalTemplate)

                      txtfile.WriteLine "Design Library - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDesignLibrary)

                      txtfile.WriteLine "Dimension/Annotation Favorites - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDimensionFavorites)

                      txtfile.WriteLine "DimXpert Callout Format File - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsTxCalloutFormatFile)

                      txtfile.WriteLine "Drafting Standards - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDraftingStandard)

                      txtfile.WriteLine "Function Builder Segment Type Definitions - Folders  - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsFuncBldrSegTypeDefinitions)

                      txtfile.WriteLine "Hole Callout Format File - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsHoleCalloutFormatFile)

                      txtfile.WriteLine "Hole Table Templates - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsHoleTableTemplates)

                      txtfile.WriteLine "Hole Wizard Favorites Database - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsHoleWizardFavoritesDB)

                      txtfile.WriteLine "Line Style Definitions - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsLineStyleDefinitions)

                      txtfile.WriteLine "Macros - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsMacros)

                      txtfile.WriteLine "Macro Feature Files - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsMacroFeatures)

                      txtfile.WriteLine "Material Databases - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsMaterialDatabases)

                      'txtfile.WriteLine "Punch Table Template - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swPunchTableTemplateFolders)

                      txtfile.WriteLine "Revision Table Templates - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsRevisionTableTemplates)

                      txtfile.WriteLine "Search Paths - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSearchPaths)

                      txtfile.WriteLine "Sheet Formats - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSheetFormat)

                      txtfile.WriteLine "Sheet Metal Bend Line Note File - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBendNoteFormatFile)

                      txtfile.WriteLine "Sheet Metal Bend Tables - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBendTable)

                      txtfile.WriteLine "Sheet Metal Bend Table Calculation - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBendCalculationTable)

                      txtfile.WriteLine "Sheet Metal Gauge Table - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSheetMetalGaugeTable)

                      txtfile.WriteLine "Spelling Folders - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSpellingFolders)

                      'txtfile.WriteLine "Sustainability Report Template Folder - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSustainabilityReportFolder)

                      txtfile.WriteLine "Textures - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsTextures)

                      txtfile.WriteLine "Title Block Table Template - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsTitleBlockTableTemplate)

                      'txtfile.WriteLine "Weld Table Template - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swWeldTableTemplateFolders)

                      txtfile.WriteLine "Web Folders - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsWebFolders)

                      txtfile.WriteLine "Weldment Cut List Templates - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsWeldmentCutListTemplates)

                      txtfile.WriteLine "Weldment Profiles - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsWeldmentProfiles)

                      txtfile.WriteLine "Weldment Property File - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsWeldmentPropertyFile)

                      txtfile.WriteLine "3D ContentCentral Model Download Folder - Folders - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocations3DCCModelFolder)

                      txtfile.WriteLine "3D PDF Themes - Folders  - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsThemeFolder)

                      txtfile.WriteLine "Sustainability Report Template Folder - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsSustainabilityReportTemplateFolder)

                      txtfile.WriteLine "Costing Report Template Folder - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCostingReportTemplateFolder)

                      txtfile.WriteLine "Costing templates - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsCostingTemplates)

                      txtfile.WriteLine "Weld Table Template - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsWeldTableTemplate)

                      txtfile.WriteLine "Bend Table Template - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsBendTableTemplate)

                      txtfile.WriteLine "Punch Table Template - " & swApp.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsPunchTableTemplate)

                       

                       

                      txtfile.Close

                       

                       

                      End Sub

                       

                       

                       

                      Message was edited by: Jason Kerns