7 Replies Latest reply on Jun 18, 2010 2:58 AM by Kishore Garakipati

    How to get foldername into the datacard?!

    Dennis Hvam

      Hello everyone.

       

      I know it is possible to get the filename (with or without extensions) automatic one your datacards:

      Filename.jpg

       

      But when it gets to foldernames the story is quite different:

      Foldername.jpg

       

      I can't figure out the "string" to write or get anywhere in EPDM to get the foldername on my datacard, or can my VAR!

       

      Any help will be highly appreciated

       

      /D

        • Re: How to get foldername into the datacard?!
          Dennis Hvam

          Oh, and I'm using SolidWorks Enterprise PDM, 2010, 10.01.0714

          • Re: How to get foldername into the datacard?!
            Kishore Garakipati

            Hi,

             

            You can set the folder name using dispatch utility thats comes with EPDM. Please follow the procedure as mentioned below.

             

            1. First you need to have a variable defined for capturing "Folder Name" value in the data card. See the Image with Prefix-1 for the procedure.
            2. Second, you need to load Dispatch utility available in the install CD. See the settings image with Prefix-2 for procedure. Details mentioned in the dispatch guide as well. Save the settings. For easy demonstration, I have set the menu command available in the Dispatch utility.
            3. Third, see the image with Prefix-3 for usage procedure. Once you are done with dispatch tool settings, you are ready to test as shown in the image.
            4. Lastly, see if you got the results as shown in the image attached with prefix-4.

             

            Hope this tip would solve your problem.

             

            Regards,
            Kishore Garakipati

              • Re: How to get foldername into the datacard?!
                Dennis Hvam

                Hi Kishore,

                 

                I don't doubt your method, but I found another way of doing it.

                 

                You can copy the value from one variable to another if the setup is correct (which means that you need to remember reverse Swedish logic)

                 

                OR you can just create a second serial number generator, (since the name of the folder is generated by a serial number) an "bind" that to the variable where the name should be.

                 

                I will still save your example and use it if my users wants more feature like this

                 

                And I have bad experience with addins, they have crashed our system more than one time. even default addins

                 

                But I really appriciate the effort and it will be used as soon as my users wake up and demand more functions like this

                 

                /Dennis

                  • Re: How to get foldername into the datacard?!
                    Michael Dekoning

                    We went about this a different way. We have a variable that's value matches the folder name (we use a template to do this when we create the folder). Our file data card has an edit-box that has a default value of the folder card variable. Whenever a file is added to that folder, the value is passed into the variable tied to the edit-box. This has worked well for us.

                     

                    Mike

                    EPDM 2010 SP2

                      • Re: How to get foldername into the datacard?!
                        Kishore Garakipati

                        Mike,

                         

                        Please see to my reply to Dennis;

                         

                        Your approach is also excellent. Simple and Out of the Box solution is my first priority too. But here is the big picture I thought off... My solution also works when you are looking for a dynamic & realtime changes to the variable value that needs to be taken care when the folder name is changed.

                         

                        Your solution also works perfect when you try using "Update Values in Files" option available when you right click on the folder. See image attached for reference.

                         

                        Mike: Your solution is better than myne since you tried to avoid customized DLL's .. Excellent

                         

                        Regards,

                        Kishore...

                      • Re: How to get foldername into the datacard?!
                        Kishore Garakipati

                        Dennis,

                         

                        Your approach is excellent. Simple and Out of the Box solution is my first priority too. But here is the big picture I thought off...

                         

                        My solution also works when you are looking for a dynamic & realtime changes to the variable value that needs to be taken care when the folder name is changed.

                         

                        If your engineers or youself try changing the folder name for X,Y,Z reasons and requirements, the variable value in the data card designating the folder name becomes invalid because synchronization is not done in real time. Your setting will work for one time and for the first time while my solution works 'N' number of times.

                         

                        But in case you have no reason to have the folder namge changed once created, your solution works perfect.

                         

                        Regards,

                        Kishore...