Buzzsaw Developer

Buzzsaw Developer

Active Member
8 Posts
0 Kudos
Registered: ‎11-26-2003
Post 1 of 2

ProjectPoint API documentation questions

287 Views, 1 Replies
01-14-2004 09:35 AM
I posting a thread from Makoto Ohura:

1. GetMetaData and Set MetaData methods
Is it possible to use these methods?
Could you give the sample VB code?

2. PPSettings class
Is it possible to use the class?
Could you give the sample VB code?

3. AddFile method in PPFolder class
Although I could create a file, I received a error message. Could you give the sample VB code?

4. get_LocalPath method in PPFile class
How to use this method? Is it different the Working Folder in Buzzsaw Thick client? Could you give the sample VB code?

5. AttachSession method
How to use this method?
Could you give the sample VB code?
Active Member
8 Posts
0 Kudos
Registered: ‎11-26-2003
Post 2 of 2

Re: ProjectPoint API documentation questions

01-14-2004 09:37 AM in reply to: JohnBartak
We are hoping to find time to revise the documentation and samples for the ProjectPoint API in the next release of ProjectPoint (the release date has not been set yet). Most of the issues you've raised will be addressed then.

In the meantime here are some answers for your questions:

Currently metadata is used for Streamline and Forms. I will only talk about Form Metadata here. We are storing the form contents as metadata on the form object. The form contents are XML and are stored in a form value that is the name of the form. I'm not entirely sure what the namespace is for forms. We have not published the schemas for the form metadata.

So in theory, it would be possible to create a new form. However, the process involves doing more than just creating metadata -- you also have to create a file and do a few other things in the right order. If you need this functionality, let me know and I'll see what I can do about providing documentation.

It is possible to use this class. Here's a copy of a piece of automated test code that we run on it:

Sub Test_Settings()
Dim ppSettings, oldName
Set ppSettings = Nothing
Set ppSettings = CreateObject("ProjectPointClient.PPSettings")

On Error Resume Next
oldTrace = ppSettings.Trace
wscript.stdout.writeline "Trace=" & oldTrace
ppSettings.Trace = True
RecordTestResult ppSettings.Trace,"TRACE1",""
ppSettings.Trace = False
RecordTestResult not ppSettings.Trace,"TRACE2",""
ppSettings.Trace = oldTrace

oldName = ppSettings.ApplicationName
wscript.stdout.writeline "ApplicationName = " & oldName
ppSettings.ApplicationName = "TestAppXXX"
RecordTestResult ppSettings.ApplicationName = "TestAppXXX", "APPLICATION_NAME",""
ppSettings.ApplicationName = oldName

oldLog = ppSettings.Log
wscript.stdout.writeline "Log=" & oldLog
ppSettings.Log = TRUE
RecordTestResult ppSettings.Log,"LOG1",""
ppSettings.Log = FALSE
RecordTestResult not ppSettings.Log,"LOG2",""
ppSettings.Log = oldLog

wscript.stdout.writeline "LogLevel=" & ppSettings.LogLevel
oldLogLevel = ppSettings.LogLevel
ppSettings.LogLevel = 3
RecordTestResult ppSettings.LogLevel=3,"LOGLEVEL",""
ppSettings.LogLevel = oldLogLevel

wscript.stdout.writeline "TraceLevel=" & ppSettings.TraceLevel
oldTraceLevel = ppSettings.TraceLevel
ppSettings.TraceLevel = 3
RecordTestResult ppSettings.TraceLevel=3,"TRACELEVEL",""
ppSettings.TraceLevel = oldTraceLevel
End Sub

Again here is part of a test program that should show you how to use AddFile:

Function GetFolder(folderName)
Dim folder,rsc
On Error Resume Next
Set folder = CreateObject("ProjectPointClient.PPFolder")
Set rsc = ppSession.GetResource(folderName)
Set folder = rsc
Set GetFolder = folder
End Function

Sub Test_AddFolderFile(folderName,fileName)
Dim folder,nRet,fileResource

On Error Resume Next
Set fileResource = Nothing
Set fileResource = CreateObject("ProjectPointClient.PPFile")

fileResource.LocalPath = testdir + "\" + fileName
nLoc = InStrRev(site,"/")
fileResource.ServerLocation = "/" + Right(site, Len(site)-nLoc) + folderName
fileResource.Name = fileName

Set folder = GetFolder(folderName)
nRet = -1
nRet = folder.AddFile(fileResource)

RecordTestResult nRet=0,"ADD_FOLDERFILE",""
End Sub

This is used when creating new files on the server. It is the location to upload the file from on your local system. See the AddFile sample above.

As the documentation states:
This only should be done when the Resource object was created on it's own instead of being returned from a PPSession function.

So some sample code would be something like:
Dim ppSession
Dim ppResource

Set ppSession = Nothing
Set ppSession = CreateObject("ProjectPointClient.PPSession")
nRet = ppSession.Login(user, pwd, site)
Set ppResource = CreateObject("ProjectPointClient.PPResource")
nRet = ppResource.AttachSession(ppSession)

Hope this helps. If you can tell me what you're trying to do, I might be able to provide some better examples.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New Buzzsaw Category!

The Buzzsaw forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!