PDMWorks API
PDMWorks API
(OP)
Ok, so I don't know if I'm completely missing the boat here, but...I'm trying to write a VB program to change the descriptions of a few hundred parts in my PDM system. I can log into the vault, take ownership of a document, and access the description of the part, but I can't change the value of the description. In addition, I also have several other custom parameters that I want to change, but have been unsuccessful in doing so. I've tried using the syntax described in the API help, but it just doesn't seem to work: PDMWProperty.Value = pVal
So, if anyone could post a line of code that will simply change the description of a part (in the vault) to the string "NEW DESCRIPTION", I'd be very grateful (this could all be related to the fact that I'm very new to VB). Thanks
So, if anyone could post a line of code that will simply change the description of a part (in the vault) to the string "NEW DESCRIPTION", I'd be very grateful (this could all be related to the fact that I'm very new to VB). Thanks






RE: PDMWorks API
Do you have PDM Advanced Server?
Bradley
RE: PDMWorks API
RE: PDMWorks API
I am not running Advanced Server either. To my understanding you cannot change anything inside the vault through standard API. If you figure this one out let us know. I am sure I could find some use for a tool that would change things inside the vault.
Bradley
RE: PDMWorks API
[get and set the document you want]
PDMWDocument.Properties("Description") = "New Description"
RE: PDMWorks API
How does one link up to the PDM vault to change a property without running Advanced Server?
I looked at the SolidWorks Task Scheduler and I do not see anyway there of updating properties within the vault.
Bradley
RE: PDMWorks API
http
RE: PDMWorks API
It may say that on the website, but API is now included with PDMWorks 2005. I'm running it right now, and I don't have a license for advanced server.
RE: PDMWorks API
Sounds like to me that flatwire would have to check-out the drawings and part models and change the properties using VB then check them back-in. He could have an admin do a bulk check-in.
Bradley
RE: PDMWorks API
Dim part As PDMWDocument
Dim propertiestlist As PDMWProperties
Dim errorcode As Long
Set part = conn.GetSpecificDocument("test.SLDPRT")
part.ChangeOwner ("pdmwadmin")
Set propertieslist = part.Properties
part.Propertiest("Description") = "SAMPLE DESCRIPTION"
errorcode = propertieslist.Update()
part.ReleaseOwnership
So basically, I took ownership of the part, put all of the properties into a variable, changed the description, and then updated the vault to reflect changes I made. The key was updating the propertieslist variable. If you've got any questions, let me know.
RE: PDMWorks API
Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
RE: PDMWorks API
RE: PDMWorks API