<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>James Kennedy's Communities Activities</title><link>https://communities.bentley.com/members/0726a589_2d00_af3f_2d00_4ccb_2d00_8770_2d00_efb2772ecbe4</link><description>Recent activity for people in James Kennedy's community</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Multiple .MRR Files leading into same menu</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/185783/multiple-mrr-files-leading-into-same-menu</link><pubDate>Wed, 18 Sep 2019 19:27:39 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:de1068ff-efe0-4ee9-860f-de3dd48afb01</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;I have multiple applications built from the ProjectWise SDK.&lt;/p&gt;
&lt;p&gt;We now want to take a step back and try to better manage our menu options in ProjectWise that activates our utilities.&lt;/p&gt;
&lt;p&gt;This has been controlled with a single .MRR file.&lt;/p&gt;
&lt;p&gt;However it has become a little tedious as of late because each time we update and Application we must also update the .MRR file.&lt;/p&gt;
&lt;p&gt;We would prefer each application have its own .MRR file, and when ProjectWise reads the .MRR file, it adds the menu pick to an existing drop down menu.&lt;/p&gt;
&lt;p&gt;In my attachment you can see I have two &amp;quot;TEST&amp;quot; Drop down menus. Is there a way I can get the options to flow into just a single &amp;quot;TEST&amp;quot; menu?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/342995/Test-Menu.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Having trouble using aaApi_IsDirectory and aaApi_FileExist in a C# Wrapper</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/175723/having-trouble-using-aaapi_isdirectory-and-aaapi_fileexist-in-a-c-wrapper</link><pubDate>Tue, 26 Feb 2019 16:18:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9a4c25d8-1573-45a8-a9ed-b73f38e93f70</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am having a bit of trouble with the following two functions. I don&amp;#39;t know exactly where the problem is occuring. It could be because I am passing it a wrong path as a string. It could also be that I am not marshaling the string correctly to work with the C# wrapper.&lt;/p&gt;
&lt;p&gt;Below is how I have my wrapper set up.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[DllImport("C:\\Program Files (x86)\\Bentley\\ProjectWise\\bin\\DMSGEN.DLL", CharSet = CharSet.Unicode)]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;public static extern bool aaApi_IsDirectory(string FolderPath);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[DllImport("C:\\Program Files (x86)\\Bentley\\ProjectWise\\bin\\DMSGEN.DLL", CharSet = CharSet.Unicode)]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;public static extern bool aaApi_FileExist(string FilePath);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Below is my usage with an example path&lt;/p&gt;
&lt;p&gt;&lt;code&gt;string TestFilePath = &lt;span&gt;&amp;quot;pw:\\\\&lt;/span&gt;&lt;span&gt;111.111.111.111:TESTSERV0&lt;/span&gt;&lt;span&gt;1\\Documents\\Projects\\Dams\\&amp;quot;;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;bool bool_ProjectWiseLocationExists = PwDotNet.aaApi_IsDirectory(TestFilePath);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;string TestFile = &amp;quot;pw:\\\\111.111.111.111:TESTSERV01\\Documents\\Projects\\Dams\\File.pdf&amp;quot;;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;bool bool_ProjectWiseFileExists = PwDotNet.aaApi_FileExist(TestFile&amp;nbsp;);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The bools always return false although I have the file and the path in ProjectWise. How can I pass it a string or set up the wrapper correctly in order to check for a file path or location.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do I need to log into the projectwise datasource first? I can do that, but I would have to build this to check all my datasources.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the help,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;James&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Custom Module DLL Registry Path</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/174151/custom-module-dll-registry-path</link><pubDate>Wed, 23 Jan 2019 22:10:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3b7dad79-0757-4039-9c31-5f39aeba8eac</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a working Custom Module DLL with the Registry Path&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Bentley\ProjectWise\10.00\CustomModules\Module_Name]&lt;/p&gt;
&lt;p&gt;However, what I really need is an ability for a user to be able to make a registry edit on his own to use the Custom Module WITHOUT Administrator Access.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What I am really asking for is a registry path to be something like&lt;/p&gt;
&lt;p&gt;[HKEY_CURRENT_USER\Software\Wow6432Node\Bentley\ProjectWise\10.00\CustomModules\Module_Name]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any such place that ProjectWise looks to load this .DLL?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question II</title><link>https://communities.bentley.com/achievements/cd3cd235-25c1-476e-bb88-33a5705ca45a</link><pubDate>Wed, 16 Jan 2019 07:19:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ca1135df-5d5e-4054-b858-3e19825cf661</guid><dc:creator /><description>Ask 10 questions in a forum.</description></item><item><title>verify existence of file in storage</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/105272/verify-existence-of-file-in-storage</link><pubDate>Tue, 10 Mar 2015 16:23:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9a3aafc8-2ccc-4b80-bc37-e7c1d311470d</guid><dc:creator>Stephanie Doherty</dc:creator><description>&lt;p&gt;I have been asked to write an API which will verify the existence of documents in their specified storage location. (Basically to make sure there are no files that show up in PW which don&amp;#39;t physically exist.) I can envision a couple of ways to do this depending on what PW functions are available.&lt;/p&gt;
&lt;p&gt;1. If there is a document function which will indicate whether the file exists in the designated storage location this is a simple Boolean task.&lt;/p&gt;
&lt;p&gt;2. If&amp;nbsp;option 1 is not available, is there a way to return the physical path on the storage location that the document is supposed to reside&amp;nbsp;in so I can check for the existence of that document?&lt;/p&gt;
&lt;p&gt;3. Use of an existing verification process which my PW Admin is not aware of at this time.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any advice or suggestions are helpful.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephanie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Let me Help You</title><link>https://communities.bentley.com/achievements/687f4b6d-e18a-4e55-836c-49926ca2c9d9</link><pubDate>Mon, 20 Nov 2017 09:55:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5bf9f3be-cc5f-4a0a-895f-774f5883fbe1</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>Question on aaApi_CopyProjectWithHierarchy</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/143288/question-on-aaapi_copyprojectwithhierarchy</link><pubDate>Thu, 16 Nov 2017 21:38:31 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:152c69be-bced-4551-ace1-285d45d9de63</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Recently I&amp;#39;ve been working on a routine that programattically moves a folder with lots of different options, similar to how ProjectWise already does it. However we have some extra hooks in place.&lt;/p&gt;
&lt;p&gt;The issue I have run into is that&amp;nbsp;&lt;span&gt;aaApi_CopyProjectWithHierarchy seems to always&amp;nbsp;have the Copeid Project&amp;#39;s Project/Folder Security and Document Security inherited from the Project/Folder it was copied to.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is a flag called&amp;nbsp;AAPRO_ARRAY_COPY_ACCESS -&amp;gt; Which states that when specified it will always get its Security from the Project/Folder that it (the folder being copied) is copied to. This makes sense to me. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, what I am unable to do is use&amp;nbsp;aaApi_CopyProjectWithHierarchy and have the folder being copied keep its own Security. Is there a flag I am missing?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My Code:&lt;/p&gt;
&lt;p&gt;LONG NumberOfProjectsCopied = 0;&lt;br /&gt; BOOL CopyProjectStatus = aaApi_CopyProjectWithHierarchy(SelectedFolderID, aaApi_GetProjectId(0), &lt;span&gt;NULL&lt;/span&gt;, &lt;span&gt;NULL&lt;/span&gt;, NULL, NULL, &amp;amp;NumberOfProjectsCopied);&lt;br /&gt; CopyFolderToProjectToolInterfaceDialogDebugLog &amp;lt;&amp;lt; &amp;quot;CopyProjectStatus: &amp;quot; &amp;lt;&amp;lt; CopyProjectStatus &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; std::endl; //Debug Statement&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you sincerely for the help,&lt;/p&gt;
&lt;p&gt;James Kennedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Visual Studio 2015 Comparability with ProjectWise SDK and Software Development</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/141303/visual-studio-2015-comparability-with-projectwise-sdk-and-software-development</link><pubDate>Tue, 26 Sep 2017 14:21:53 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:cc6dbb3f-3978-4ae0-8800-4ad8e894df6b</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;Hello!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;Currently I use Visual Studio 2010 on Windows 7 for my software development needs.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;I have been delaying moving to Visual Studio 2015 for some time now, and also delaying moving to Windows 10 for reasons that I&amp;#39;m sure most can understand.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;There is now an initiative to begin moving to Visual Studio 2015 and Windows 10 so I don&amp;#39;t really have a choice in the matter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;Is there any issue I need to be aware of when developing ProjectWise tools and utilities with 2015? I&amp;#39;ve read in some other forum posts that SDK documentation states 2010 is required, but these posts are made a few years ago. My SDK Documentation I have states that it uses 2005. I plan to continue my development in C++ so that&amp;#39;s no problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;Thank You,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;James Kennedy&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;304-962-5959&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:150%;"&gt;jameskennedy2265@hotmail.com&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>What is the ProjectWise Hook Identifier for this Menu Command - Document -&amp;gt; New -&amp;gt; Document</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/140422/what-is-the-projectwise-hook-identifier-for-this-menu-command---document---new---document</link><pubDate>Fri, 01 Sep 2017 18:45:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:488885f6-803a-4209-9a9e-fa39599af531</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/342995/what-is-this-hook.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/342995/what-is-this-hook.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;I am attempting to figure out which hook I should use too hook a single process of creating a document from the Menu command&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;Document -&amp;gt; New -&amp;gt; Document&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;As shown in my picture.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;I know of one hook called&amp;nbsp;AAHOOK_EXEC_MENU_COMMAND, however this hook is not ideal to use as I am not interested in hooking every single menu command.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;I just need the Hook that brings up the Document Creation Dialog and then the Create Document. Looking in the SDK I have found&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;AAHOOK_CREATE_DOCUMENT&lt;br /&gt;AAHOOK_CREATE_DOCUMENT_DLG&lt;br /&gt;AAHOOK_CREATE_DOCUMENTS_DLG&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;But none of these work. If you think they should then I can post my code to verify that I am calling hooks correctly. I hook other functions and commands, but I am unable to hook that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;Thank you for your assistance,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;James Kennedy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;304-962-5959&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;jameskennedy2265@hotmail.com&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Select Multiple Projects/Folders at one time through aaApi_SelectProjectDlg</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/139832/select-multiple-projects-folders-at-one-time-through-aaapi_selectprojectdlg</link><pubDate>Wed, 16 Aug 2017 13:38:31 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a7785db8-0d01-49f8-94cd-d0b443d702ac</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Is there anyway to select multiple Projects or Folders in a Dialog of some sort using the ProjectWise SDK?&lt;/p&gt;
&lt;p&gt;I have found the API calls in order to bring up the ability to select a single Project and store it into the buffer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked through the SDK guide to see if I could fine something, but was not having any luck. The main reason I need this is in order to grab multiple folder IDs and their locations within ProjectWise per user selection, and then use the User&amp;#39;s Selection of Projects to apply a wide range of things, such as applying multiple permissions, multiple user access groups, checking if a folder is empty and then doing an action, etc.&lt;/p&gt;
&lt;p&gt;If there is no solution through the SDK then I think I will have to tackle it by just looping through the Project/Folder tree, grabbing every Name of every Project/Folder and then pushing it into a custom dialog that will allow users to then Select Multiple Projects. If you have any advice on implementing this I would really appreciate it.&lt;/p&gt;
&lt;p&gt;Thanks for the assistance,&lt;/p&gt;
&lt;p&gt;James Kennedy&lt;br /&gt;304-962-5959&lt;br /&gt;jameskennedy2265@hotmail.com&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://communities.bentley.com/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Thu, 27 Jul 2017 11:52:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:89096231-a3b2-4947-9861-5393d14f212a</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>How to get the Visual Label of a Document Column Property?</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/135232/how-to-get-the-visual-label-of-a-document-column-property</link><pubDate>Thu, 20 Apr 2017 17:50:07 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0b0e0278-4c35-4c3b-8a37-71c90b0f2fa6</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How do I receive this (the red circle in picture) through an API call? I need the label string.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/342995/HowTo.png"&gt;&lt;img src="/resized-image/__size/940x0/__key/communityserver-discussions-components-files/342995/HowTo.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have successfully been able to programmatically receive the values and data surrounding it, but I cannot figure out how to receive the label. For example I am able to get the property named FY (Fiscal Year) and I am able to get its value (2013).&amp;nbsp; I am able to get its data by using the following code below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;LONG EnvironmentID = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG TableID = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LONG ColumnID = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOOL DidIGetEnvironmentTable = aaApi_GetEnvTableInfoByProject(SourceProjectID,&amp;amp;EnvironmentID,&amp;amp;TableID,&amp;amp;ColumnID);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;debugstatementlogger &amp;lt;&amp;lt; &amp;quot;DidIGetEnvironmentTable: &amp;quot; &amp;lt;&amp;lt; DidIGetEnvironmentTable &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; std::endl;&amp;nbsp;&amp;nbsp; &amp;nbsp;// v2.0 debug statement&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LONG NumberOfColumns = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LONG NumberOfLinks = aaApi_SelectLinkDataByObject(TableID,AADMSLDT_DOCUMENT,SourceProjectID,SourceDocumentID,NULL,&amp;amp;NumberOfColumns,NULL,NULL);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for(int i = 0; i &amp;lt; NumberOfLinks; i++){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for(int j = 0; j &amp;lt; NumberOfColumns; j++){&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CString LinkDataPropName;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LinkDataPropName = aaApi_GetLinkDataColumnStringProperty(LINKDATA_PROP_COLUMN_NAME, j);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CString LinkDataPropDesc;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LinkDataPropDesc = aaApi_GetLinkDataColumnStringProperty(LINKDATA_PROP_COLUMN_DESC, j);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CString LinkDataPropFormat;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LinkDataPropFormat = aaApi_GetLinkDataColumnStringProperty(LINKDATA_PROP_COLUMN_FORMAT, j);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CString LinkDataPropValue;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LinkDataPropValue = aaApi_GetLinkDataColumnValue(i, j);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is probably something very simple, but I have scoured the SDK documentation for a way to receive that name and am still searching for it. If I figure it out before I get an answer I will answer my own question, but I have tried many different API calls without success.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for assistance!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;James Kennedy&lt;/p&gt;
&lt;p&gt;304-962-5959&lt;/p&gt;
&lt;p&gt;jameskennedy2265@hotmail.com&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to get LPCWSTR data out of AADOCMOVE_PARAM structure in C++?</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/135119/how-to-get-lpcwstr-data-out-of-aadocmove_param-structure-in-c</link><pubDate>Tue, 18 Apr 2017 17:06:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5520b82c-161e-481d-b025-8d82e65d87b0</guid><dc:creator>James Kennedy</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am writing code that interacts with dragging and dropping files from one Datasource to another Datasource with a custom dialogue tool.&lt;/p&gt;
&lt;p&gt;One of the needs I have is to be able to get the data out of the structures _AADOCMOVE_PARAM and _AADOCSCOPY_PARAM.&lt;/p&gt;
&lt;p&gt;This is during the hooks of AAHOOK_COPY_DOCUMENTS_CROSS_DS and AAHOOK_COPY_DOCUMENT_CROSS_DS.&lt;/p&gt;
&lt;p&gt;I have been able to get some data out of the structures. For example - &lt;/p&gt;
&lt;p&gt;HDSOURCE TargetDataSource;&lt;br /&gt;TargetDataSource = ((AADOCMOVE_PARAM*)aParam1)-&amp;gt;hTrgDatasource;&lt;br /&gt;aaApi_ActivateDatasourceByHandle(TargetDataSource);&lt;/p&gt;
&lt;p&gt;This gets the target datasource out of aParam1 within the hook by calling that structure. I then am able to set my current datasource. I am also able to get other variable types, such as LONG, out of the structures successfully.&lt;/p&gt;
&lt;p&gt;However I cannot figure out how to get LPCWSTR out of the structs, it appears to always be NULL - which is a possibility, but why would filename be null?&lt;/p&gt;
&lt;p&gt;For example I am trying to get the parameter &amp;quot;lpctstrFileName&amp;quot; from struct &amp;quot;_AADOCMOVE_PARAM&amp;quot; &lt;/p&gt;
&lt;p&gt;LPCWSTR FileNameLPCWSTR&amp;nbsp; = (((AADOCMOVE_PARAM*)aParam1)-&amp;gt;lpctstrFileName);&lt;/p&gt;
&lt;p&gt;This appears to work until I actually try to manipulate the data in FileNameLPCWSTR. There is nothing there? The same goes for all LPCWSTR data I am trying to receive.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Below is my full code of how I am logging the FileName of a document that is going to be copied and moved.&lt;/p&gt;
&lt;p&gt;//Get The FileName&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPCWSTR FileNameLPCWSTR&amp;nbsp; = (((AADOCMOVE_PARAM*)aParam1)-&amp;gt;lpctstrFileName);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CW2A pszC(FileNameLPCWSTR);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPCSTR FileNameLPCSTR = pszC;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CString FileNameCString = L&amp;quot;&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FileNameCString = FileNameLPCSTR;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CT2CA pszConvertedAnsiStringC(FileNameCString);&amp;nbsp;&amp;nbsp;&amp;nbsp; // v2.0 Convert SQL statement to normal CT2CA&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;std::string strStdC (pszConvertedAnsiStringC);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// v2.0 Converts to normal string&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;debugstatementlogger &amp;lt;&amp;lt; &amp;quot;FileNameCString: &amp;quot; &amp;lt;&amp;lt; strStdC &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; std::endl;&amp;nbsp;&amp;nbsp; &amp;nbsp;// v2.0 debug statement&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank You!&lt;/p&gt;
&lt;p&gt;James Kennedy&lt;/p&gt;
&lt;p&gt;jameskennedy2265@hotmail.com&lt;/p&gt;
&lt;p&gt;304-962-5959&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>