facing issue with Projectwise aaApi_GetDocumentStringProperty(DOC_PROP_FILENAME,i) using C#

Hi

I am using Projectwise APIs in C# using DLLImports, all my other APIs work without any failure. But when I tried to aaApi_GetDocumentStringProperty(DOC_PROP_FILENAME,i) API  my program terminated without giving any error. Can anyone help me to figure out this.

 

My code,

[DllImport(@"C:\Program Files (x86)\Bentley\ProjectWise\Bin\dmscli.dll", CharSet = CharSet.Unicode, SetLastError = true)]   

public static extern string aaApi_GetDocumentStringProperty(int lPropertyId,int lIndex);

function()

{

 int Count = PWAPIs.aaApi_SelectDocumentsByProjectId(project_no);

for (i = 0; i < Count; i++)

{

string fileName = PWAPIs.aaApi_GetDocumentStringProperty(DOC_PROP_FILENAME, i);

...

..

}

}

Regards,

Atul Dusane

 

Parents Reply Children
No Data