Inspired by this thread
I'm trying to call the ProjectWise API from MDL/cpp. I would like to get the active datasource, project and document from PW Explorer and I've tried to do it this way:
HDSOURCE dataSource = aaApi_GetActiveDatasource();
if (dataSource == NULL)
lifalib_dmsg("Count = %d", aaApi_GetProjectCount());
The dataSource is NULL and the number of projects is -1...
There is no problem in find a datasource by name:
if (aaApi_GetDatasourceHandlesByName(L"Test", &pdataSource, &count))
What am I missing or doing wrong ?
Evan H. Hansen
please be aware this is general Developer and Programming forum. Because you want to use ProjectWise API, I recommend to move the question to ProjectWise Programming forum. To move existing discussion to another forum, use More > Move tool, available under the original post.
Also, please respect the best practices and to share mandatory information about used products and their version (in this case, the combination of MicroStation and ProjectWise client). It's hard to guess anything when information like whether you use V8i or CONNECT Edition (and what build), plus what Visual Studio do you use, is not known.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
The question have now been moved to the PW programming forum...
EvanH said:The question have now been moved to the PW programming forum...
Unfortunately, it looks like you did not move anything, but you duplicate the post (by asking the same in PWP forum). It breaks the best practices and creates confusing situation, because two quite the same threads exist .. and what is the active one?
Why to do things in a wrong way, when the right one exists and is simple (and I wrote how to do it)?
Any news regarding this issue ?
Of course your code work fine in our environment Since you are a member of BDN we have contacted you to arrange a screen sharing session.
Mark Weisman | Senior Consultant | Bentley Systems, Inc.