Programming PDMWorks through Excel
Programming PDMWorks through Excel
(OP)
Hi, I am new to eng-tips.com, I recently started working with PDM works, and i am trying to access a file in my vault with excel, i want to lock the file when i press an activeX button in excel, then edit the file, save it and unlock it. i added the pdm works library to VBA (edmInterface.dll) and
i was trying to acces my file.
i notices that there is a data type lEdmVault5 and lEdmVault5 but I am unsure how to link my pre existing vault to this.
i was trying to acces my file.
i notices that there is a data type lEdmVault5 and lEdmVault5 but I am unsure how to link my pre existing vault to this.






RE: Programming PDMWorks through Excel
I am not sure what your point of view is in regards to PDMWorks, but I would never access files in the vault directly and work on them live. The vault is a place that stores and controls files. When a change has to be made to a file, then that file should be checked out of the vault, changed as required, and then checked back in(at the next revision level if required). If you are going to access a file live in the vault(which I do not think you can, or should) then you compromise the purpose of the system that you create when implementing PDMWorks.
Kevin
Take care & have fun!
Kevin
"Hell, there are no rules here -- we're trying to accomplish something." - Thomas A. Edison
RE: Programming PDMWorks through Excel
im just not sure how to link the
dim vault as lEdmVault5
to my vault and the
dim file as lEDMFile5
to the database file.
RE: Programming PDMWorks through Excel
I think you may eventually open a can of worms.
Chris
SolidWorks 07 4.0/PDMWorks 07
AutoCAD 06
ctopher's home (updated 04-21-07)
RE: Programming PDMWorks through Excel
RE: Programming PDMWorks through Excel
A good place to look for information is in the API help file installed with SolidWorks. On my system it is located at:
C:\Program Files\SolidWorks 2007\api\pdmworksapi.chm
The following might be good places to look within the API help file:
- Get Specific Document Example
- PDMWConnection Object
- PDMWDocument Object
EricRE: Programming PDMWorks through Excel
RE: Programming PDMWorks through Excel
Chris
SolidWorks 07 4.0/PDMWorks 07
AutoCAD 06
ctopher's home (updated 04-21-07)
RE: Programming PDMWorks through Excel
On your enterprise install CD there will be folder called "Support\API", there is a help file on the Enterprise API there.
In the meantime, to initialize the Vault interface:
Dim myVault as IEdmVault7
set myVault = new edmVault5
myVault.login "Name of the Vault","Username","Password"
Or...to login under the users current credentials:
myVault.loginauto "Name of the Vault"
To grab your document interface, you can do it by full path to the document:
Dim myFile as IEdmFile6
Set myfile = myvault.getfilefrompath("FilePath")
Once you have the file interface, there are LockFile and UnlockFile methods to Check the file in and out.
Hope this helps!
RE: Programming PDMWorks through Excel
RE: Programming PDMWorks through Excel