18 Replies Latest reply on Feb 13, 2009 5:11 AM by Mike Adam

    PDM to Information System...!

    Mike Adam
      My manager asked me to modify PDM Enterprise 2009 to be as Information System for all our data (doc, xls, jpg, wmv....etc) , he wants me to create Data card as information system
      lets say I selected a word file inside the vault "quotation.doc"
      so in the data card there must be :

      name of the company
      company type (prospect or customer)
      Employee :
      address :
      Phone :
      software : Autocad or SolidWorks...etc

      Lets say that I entered the company name, so the address, phone, software and employees who they are inside that company must appear automatically in the data card

      I was thinking to make lists, and to control the drop-down list by the value inside the data card but that would be headache whenever we want to add one company or update the information for the company. I don't know in that case if its better to make SQL tables. or normal lists from the pdm administration tools.
      and It will be very headache to control the lists by the company name

      please take a look at the attachment and then you would understand what i wanted to explain
        • PDM to Information System...!
          Joy Garon
          Mike -

          I'm not entirely sure what you are trying to accomplish.
          First question: are you trying to create one data card whose content changes based on the type of document selected?

          Next question: to be able to make a selection from a list (company name) and have it automatically fill out the associated columns on the data card requires another datasource (database most likely) and requires an add-in to fill the associated columns. (see movie file in attached zip)

          Joy
            • PDM to Information System...!
              Andreu Fernandez
              Where is the information that you want to get filled automatically stored?

              If you have it in a SQL based system (that is what I think you mean) you will need to create an AddIn to gather and map the variables. I agree it is very difficult to manage that from the customer name, so I suggest you to include the customer selection in a separated Visual Basic form and map the information from there.
            • PDM to Information System...!
              Mike Adam
              Thanks Mrs. Joy Garon
              The video which you've created was helpful, I appreciate it and I will be pleasant if I get the add-in and an explanation
              about modifying and adding it to PDM enterprise.

              First answer: no. I'm trying to make data card which will be set manually from the user for any document inside the vault.
              2nd answer : Exactly, that is the point which I want to apply it. but still I don't know how to create the add-in which fills the the associated columns. I would be happy if I get the add-in example. and if there is any help files for programming add-ins for PDME.
              -
              Mr Andreu Fernandez Thanks for contributing with us
              The information will be stored in SQL database.
              and about your suggestion for including the customer name in visual basic form,
              I don't know how to do that, because I only have basic knowledge in Visual Basic.



              Thanks a lot
              Regards
                • PDM to Information System...!
                  Joy Garon
                  Hi Mike -

                  Actually, it's Mrs. Joy Garon -

                  I do not think it's a good idea for me to provide you with a sample since you do not have programming skills.
                  I would suggest that you contract with someone who has the necessary skill set. (Perhaps your VAR can help).
                  The API help is provided on the CD and a skilled programmer with Enterprise knowledge should be able to look at the video I provided and assit you.

                  Best Regards,
                  Joy
                • PDM to Information System...!
                  Mike Adam
                  OK thanks Mrs. Joy
                  I would try to find programmer who would help me with it.
                  I wanted to try it by myself, anyway I appreciate your help
                  and I understand your worries about the risk of sending me the Add-in sample.

                  Regards
                  Mike
                  • PDM to Information System...!
                    Mike,

                    I suggest that you submit an enhancement request for this functionality. As you mentioned this is a headache to do something like this with dependent dropdown lists. You should not have to do this using the API to create an add-in. I ran into this same issue and already submitted one, but the more people that request the enhancement, the faster it will get added.
                    • PDM to Information System...!
                      Mike Adam
                      Wayne Matus Thanks for the suggestion
                      I will submit an enhancement request for this functionality, but I don't understand why there is no downloadable add-in samples
                      for PDM Enterprise available on the customer portal. PDM must be supported more by SolidWorks
                      If we view the API for SolidWorks CAD software we find a lot of samples, but if we go to PDM Enterprise section
                      we will find not rich data for supporting the users of PDM. I wish to see in the future more support resources on internet for PDME


                      Regards
                      Mike
                      • PDM to Information System...!
                        Mike,

                        A couple of reasons for not having sample Enterprise add-ins on the API site. First, Enterprise is a new product compared to SolidWorks. Most of the SolidWorks add-in samples are more than 3 years old, which is older that the Enterprise product. Second, Most of the people that write the Enterprise add-ins, do implementations for a living. They will be shooting themselves in the foot if they make their add-ins available for free to anyone that they developed for their clients.

                        Here is a link to Jeff Cope @ Extensible Cad Technoligies site where you can download a template you can use to develop Enterprise add-ins.

                        http://extensiblecad.com/words...omagically-delicious/
                        • PDM to Information System...!
                          Mike Adam
                          Wayne Matus
                          Thanks for clearing up, I would try to make some add-ins for PDM Enterprise,
                          In case if I success in creating some add-ins I would upload it and give it for free to everyone .


                          Regards
                          Mike
                            • PDM to Information System...!
                              Mike Adam
                              Hello everyone
                              I have tried to make my first add-in in Visual Basic Express 2008, after I write the codes and compile the project to DLL then I imported the file into PDMWE
                              add-ins in the administration tools, until here everything was ok
                              til I tried to enter the Vault

                              "Booooom!!!!! Error message Appears
                              the error message is attached.

                              anyone here has the idea what gone wrong in my add-in ?
                            • PDM to Information System...!
                              Mike,

                              First guess, that you did not add the additional dll files needed. In the admin tool, you will first have to remove the add-in. This time when you add a new add-in, click on the "Add files" button. and add the "Interop.EdmLib.dll". If your add-in is also launching SolidWorks, then you will also have to add "Interop.SldWorks.dll" and "Interop.SwConst.dll".

                              Could also be an issue if you are running 64 bit version of Enterprise.
                              • PDM to Information System...!
                                Mike Adam
                                Dear Wayne Matus, Thanks for your tip. I added the dll file. and now I dont get the error message but the dll add-in wasn't working inside the data card, so I think I've missed some commands in visual basic,


                                anyone got add-in samples for the purpose of testing ?

                                Regards
                                Mike
                                  • PDM to Information System...!
                                    When you are developing an add-in for Enterprise, it is best to "Debug Add-ins" rather than add. In the admin tool, right mouse on the Add-ins icon and "Debug Add-ins". Click on the "Add Add-ins" button and browse for your dll. You will not need to include the "Interop.EdmLib.dll" since it is in the same folder as your add-in. Be sure and put in a lot of Try and Catches to see where it is blowing up. Before you make any changes to your code, you will have to kill your "explorer.exe" process and restart it. Otherwise, you will not be able to compile or save your changes.

                                    Here is sample code that will display a message box that tells you what variable the input box that is changing is tied to. You should be able to modify it to work for you.

                                    Imports EdmLib
                                    Public Class PDMWEaddin
                                    Implements IEdmAddIn5

                                    Public Sub GetAddInInfo(ByRef poInfo As EdmLib.EdmAddInInfo, ByVal poVault As EdmLib.IEdmVault5, ByVal poCmdMgr As EdmLib.IEdmCmdMgr5) Implements EdmLib.IEdmAddIn5.GetAddInInfo
                                    ' Fill in the AddIn's description
                                    poInfo.mbsAddInName = "PDMWE add-in"
                                    poInfo.mbsCompany = "Texas Engineering Systems"
                                    poInfo.mbsDescription = "Monitor Data Card input"
                                    poInfo.mlAddInVersion = 1
                                    poInfo.mlRequiredVersionMajor = 8
                                    poInfo.mlRequiredVersionMinor = 0

                                    ' Add hook to monitor Data Card Input
                                    poCmdMgr.AddHook(EdmCmdType.EdmCmd_CardInput)

                                    End Sub

                                    Public Sub OnCmd(ByRef poCmd As EdmLib.EdmCmd, ByRef ppoData As System.Array) Implements EdmLib.IEdmAddIn5.OnCmd

                                    ' Display messagebox for data card variable that has changed
                                    MsgBox(poCmd.mbsComment & " has changed!")
                                    ' place your code here
                                    End Sub
                                    End Class
                                      • PDM to Information System...!
                                        Mike Adam
                                        Hello Everyone,
                                        I am tired of debugging the problem, I tried to find what was the problem
                                        but I wasn't able to do it.
                                        Please can anyone here take a look at the attached file and try to repair the code.
                                          • PDM to Information System...!
                                            Mike,

                                            Nothing personal, but I think you are over your head on this one. You should pay for someone to do this.

                                            The code you have is to add a button "Launch The About Form", not to monitor card input.

                                            poCmdMgr.AddCmd(1001, "Launch The About Form", EdmMenuFlags.EdmMenu_HasToolbarButton, "Launch The About Form", "Launch The About Form", 0, 99)

                                            Looking at your code, there are several other potential problems.

                                            1. Do you have a datacard variable called "VendorName"?
                                            2. Is SQL Server on your local computer, server=(local)?
                                            3. Is there a database called "VendorDB"?
                                            4. Does this database have a table called "Vendor"?
                                            5. Does this table have the following columns "Name", "Location", and "Contact"?
                                            6. Do you have a datacard variable called "VendorLocation"?
                                              • PDM to Information System...!
                                                Mike Adam
                                                Hi Wayne
                                                Thanks for your suggestion, its not about money, but I like to do everything by myself because in future whenever I will need the programmer who will do the add-ins to do some fixes , he wouldn't be here for it. and this is headech to bring another programmer who will reprogram everything again.


                                                1- Yes I have datacard with variable "VendorName"
                                                2- yes "(local)"
                                                3-yes there is "VendorDB" database
                                                4- yes I have created Table called "Vendor"
                                                5- yes the table has columns "Name, "location" , and contact
                                                6- yes I do have in my card variable called vendor location
                                        • PDM to Information System...!
                                          OK,

                                          Replace

                                          poCmdMgr.AddCmd(1001, "Launch The About Form", EdmMenuFlags.EdmMenu_HasToolbarButton, "Launch The About Form", "Launch The About Form", 0, 99)

                                          with

                                          poCmdMgr.AddHook(EdmCmdType.EdmCmd_CardInput)

                                          Also, I am not sure if you know where the Enterprise API help file is located. It is API_GB.chm and is located in your Enterprise install directory.

                                          • PDM to Information System...!
                                            Mike Adam
                                            Thanks Wayne Matus.
                                            I appreciate your help, the error message is gone, but my add-in didn't work to change the variable in the data card
                                            so I'm gonna look for a programmer to do it for me because I wasn't able to do even with your help.


                                            Thanks everyone
                                            Regards