×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Programming PDMWorks through Excel

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.

RE: Programming PDMWorks through Excel

rjshahan,

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

(OP)
hi, i have an excel file that serves as a database in the vault. i have another excel file which serves as a sort of an interface, i have these two files communicating but occasionally some data needs to be added to the database file, but i dont want users to have to check out the database file and the interface file, they should check out the interface file and be oblivious of the other file, i am trying to access this database file through VBA in Excel and check out the file make the necessary changes and check it back in. thus limiting control of the file to what i program into the software and not to the user.

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

If you are using Excel to do what PDMWorks can do, what's the point of having PDMWorks? Just store all of your files on a server and use your Excel file.
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

(OP)
my project involves only 2 files but there is a whole vault filled with a few million files for other projects that are solidworks based that require PDM Works, the entire system is based on PDM Works

RE: Programming PDMWorks through Excel

I think the OP wants to use Excel to create an automated procedure which checks out a file from the vault, modifies it and checks it back in.  This seems like a valid use of the vault and it looks like the PDMWorks API has the functionality to support this.

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
Eric

RE: Programming PDMWorks through Excel

(OP)
found it, thanks...thts wat i was lookin for

RE: Programming PDMWorks through Excel

Sorry if I misunderstood.

Chris
SolidWorks 07 4.0/PDMWorks 07
AutoCAD 06
ctopher's home (updated 04-21-07)

RE: Programming PDMWorks through Excel

Judging from the object names mentioned I would assume rjshahan is using Enterprise, not PDMW Workgroup.

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

(OP)
thanks thats really helpful, now how do i set this thread to resolved

RE: Programming PDMWorks through Excel

rjshahan ... The threads don't have a "Resolved" setting. After 6 months of inactivity it will be automatically set to a read only "Closed Thread".

cheers

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources