I'am using the SDK kit to create folders and documents, which works fine, even in VB.NET. But i'am not having any luck in setting the environment name.
Normaly when you create a folder it inherit the environment settings from the parent folder, but it doesn't seem to be the issue when i'am creating folders with the SDK kit.
Is there a way to assign an environemt to a folder an a document. The other solution would be creating the information in the SQL database manually doesn't sound appealing :-)
Thank a'lot in advance
You can do it with aaApi_CreateProject2(). You can also do it after you create it with one of the "project" modify functions. Keep in mind that in the ProjectWise SDK documentation, for legacy reasons, that "folders" are referred to as "projects" and "vaults" and that "projects" are actually folders too. "Projects" in ProjectWise are referred to as "rich projects" in the documentation.
PS - I forgot to mention that you really, really shouldn't attempt to modify anything directly in the database. Always use the APIs. The only exception would be, and is commonly done and is OK, is to update rows in your environment tables for only the user attribute columns. This is one of the reasons why there is the "Create attribute records upon document creation" option for environments. It allows you to "snyc" some of your user attributes with other systems via SQL based procedures, etc. Don't attempt to create or delete rows from the environment tables without using the APIs!
Dan WilliamsSolution ConsultantBentley Systems, IncorporatedPortland, OR, USA (Pacific Time UTC-08:00)
If the structure marshaling is too difficult, you can manually set the parent folder's environment and then the subfolders you create should inherit that setting.
I haven't checked recently, but I believe that environments are only "inherited" (made the same as the parent) if you use one of the Dialog based function calls.
Environments are not inherited.
I have the project and document creation working, and I see that I could use the modify project funktion, but my programming knowledge does not extend to the usage of hooks.
aaApi_ModifyProject2 ( LPAADMSPROJITEM lpProject
Do you have some examples that could help me
The CreateProject2 is using hooks too so that why I used CreateProject
Is it so
Nobody can help me out here ?
Have nobody tried this in VBA ?
Any help is aprieciated