<?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>Rajesh Varatharajan's Activities</title><link>https://communities.bentley.com/members/6c0c6912_2d00_8009_2d00_4b75_2d00_ba49_2d00_1523204d99b2</link><description>Rajesh Varatharajan's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>How to get window main handle?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/211165/how-to-get-window-main-handle</link><pubDate>Tue, 16 Mar 2021 10:39:14 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:41a2e37c-9505-4b17-825c-4d936c80d5fe</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;My code is as follows:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#include &amp;lt;Mstn\MdlApi\MdlApi.h&amp;gt;&lt;br /&gt;#include &amp;lt;Mstn\cmdlist.r.h&amp;gt;&lt;br /&gt;#include &amp;lt;Mstn\MdlApi\msnativewindow.h&amp;gt;&lt;br /&gt;#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;#include &amp;lt;DgnPlatform\DgnFile.h&amp;gt;&lt;br /&gt;#include &amp;lt;DgnPlatform\DgnFileIO\DgnFileIOApi.h&amp;gt;&lt;/p&gt;
&lt;p&gt;extern &amp;quot;C&amp;quot; DLLEXPORT void MdlMain(int argc, WCharCP argv[])&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;HWND hWnd = NULL;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hWnd = (HWND)mdlNativeWindow_getMainHandle(0);&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/Err1.png" /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;can&amp;#39;t able to resolve these build errors.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to cancel save/auto-save action through API?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/213486/how-to-cancel-save-auto-save-action-through-api</link><pubDate>Wed, 05 May 2021 16:51:13 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5f4a3d41-4ab6-44fa-a122-5ac17c617952</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to cancel some actions (ex. &lt;span&gt;File-&amp;gt;Save,&amp;nbsp;&lt;/span&gt;File-&amp;gt;SaveAs, &lt;span&gt;File-&amp;gt;&lt;/span&gt;print,&amp;nbsp;&lt;span&gt;File-&amp;gt;close). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;nbsp;can able to block other commands in above except File-&amp;gt;Save. While blocking save action, the modifications are getting saved.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After MS_DGNAUTOSAVE set to 0, modifications not saved. How to block autosave action through programmatically.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;InputFilterReturnValue monitorFunction(Inputq_element* queueElementP) 
{	
	if (queueElementP != NULL)
	{
		if (queueElementP-&amp;gt;u.cmd.command == File_Save)
		{
			return INPUT_REJECT;
		}
	}
	return INPUT_ACCEPT;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In above code File_Save is commandid of File-&amp;gt;Save action.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rajesh Varatharajan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to disable menu in MicroStation CE Update15 using XCommands?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/213229/how-to-disable-menu-in-microstation-ce-update15-using-xcommands</link><pubDate>Wed, 28 Apr 2021 18:11:35 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bad19611-b9af-42a0-b661-dc7041e2eb8c</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;Attached sample code snippet. I am getting command name using Xcommand.&lt;/p&gt;
&lt;p&gt;In that, there is SetIsEnabled(bool Enabled) API.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How to use this. I am facing compilation error in Visual Studio 2017.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void DisableMenu()
{
	 IXCommandCP cmd_ptr = XCommandManager::GetManager().FindXCommandByIconName(L&amp;quot;About&amp;quot;);
	 IXCommand* xcmd = (IXCommand*)cmd_ptr;
	 xcmd-&amp;gt;SetIsEnabled(FALSE);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;error LNK2019: unresolved external symbol &amp;quot;__declspec(dllimport) public: void __cdecl Bentley::ECN::IUICommand::SetIsEnabled(bool)&amp;quot; (__imp_?SetIsEnabled@IUICommand@ECN@Bentley@@QEAAX_N@Z) referenced in function &amp;quot;void __cdecl DisableMenu(void)&amp;quot; (?DisableMenu@@YAXXZ).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rajesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Enable/Disable Ribbon Buttons using Named Expressions?</title><link>https://communities.bentley.com/products/administration/f/product-administration-forum/212946/enable-disable-ribbon-buttons-using-named-expressions</link><pubDate>Thu, 22 Apr 2021 08:23:26 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2bb2a05b-f45d-4107-9510-11754dc05b15</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am working in MicroStation CE Update15. I need to enable /disable ribbon menu buttons based on a variable value.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When i searched in community, many suggestions was can be done through &amp;quot;Named Expressions&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please provide me an simple example using Named Expressions to achieve this.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to implement  SetFileSaveFunction callback function?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/210625/how-to-implement-setfilesavefunction-callback-function</link><pubDate>Thu, 04 Mar 2021 18:48:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:eec29566-09ba-418f-9a71-b0ab4a676f44</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;I&amp;nbsp;develop add-on for MicroStation using CONNECT Edition application with C++.&lt;/p&gt;
&lt;p&gt;Using Microstation10.15 update SDK&lt;/p&gt;
&lt;p&gt;I would like to get Save&amp;nbsp; event when save triggered.&lt;/p&gt;
&lt;p&gt;extern &amp;quot;C&amp;quot; DLLEXPORT void MdlMain(int argc, WCharCP argv[])&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SystemCallback::SetFileSaveFunction(OnFileSave);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void OnFileSave(DgnPlatform::ProcessChangesWhen when, DgnPlatform::DgnFileChanges changesFlag, DgnPlatform::DgnSaveReason reason, double timestamp, DgnFileP pFile)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WString Filename = pFile-&amp;gt;GetFileName();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (reason == DgnPlatform::DgnSaveReason::UserInitiated)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// do operations&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;OnFileSave&amp;nbsp;&lt;span&gt;&amp;nbsp;function is never called.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;How can I&amp;nbsp;make this callback functionality working?&lt;/p&gt;
&lt;div class="jfk-bubble gtx-bubble" style="left:150px;top:-48px;"&gt;
&lt;div class="jfk-bubble-content-id" id="bubble-2"&gt;
&lt;div id="gtx-host"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="jfk-bubble-closebtn-id jfk-bubble-closebtn"&gt;&lt;/div&gt;
&lt;div class="jfk-bubble-arrow-id jfk-bubble-arrow jfk-bubble-arrowdown" style="left:157px;"&gt;
&lt;div class="jfk-bubble-arrowimplbefore"&gt;&lt;/div&gt;
&lt;div class="jfk-bubble-arrowimplafter"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Load MDL app on Application Startup (MS_INITAPPS)</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/210841/load-mdl-app-on-application-startup-ms_initapps</link><pubDate>Tue, 09 Mar 2021 19:03:02 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:85e4b959-ea88-4f87-bb32-1cd7a9567465</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;I am facing some issues in Successful loading MDL apps on Startup.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have modified code as below and loaded MDL app.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if (strcmp(l_str_argument.c_str(), &amp;quot;MS_INITAPPS&amp;quot;) == 0)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mdlSystem_enterGraphics();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mdlInput_sendCommand(CMD_DIALOG_OPENFILE, L&amp;quot;STARTUP&amp;quot;, MSInputQueuePos::INPUTQ_HEAD, NULL, 0);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SystemCallback::SetFileSaveFunction(OnFileSaveCallBack);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After executing above code, I am able to get MicroStation window. When I select any file displayed , Application gets crashed.&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/MS1.png" /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/MS2.png" /&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, 04 Mar 2021 07:42:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0c877bdb-a693-485a-ab8b-8fa76c55919e</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>How to Encrypt dgn file using externel dll?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/210626/how-to-encrypt-dgn-file-using-externel-dll</link><pubDate>Thu, 04 Mar 2021 18:53:39 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:51af6bb8-e6a4-42b0-9b9f-1c3ccb71df9e</guid><dc:creator>Rajesh Varatharajan</dc:creator><description>&lt;p&gt;We have our own encrypt mechanism . We would like to implement it when save action triggers.&lt;/p&gt;
&lt;p&gt;Also we would like to decrypt it when open action triggers.&lt;/p&gt;
&lt;p&gt;We tried with Read and Write API hooking. But its not Succeeded.&lt;/p&gt;
&lt;p&gt;Is there any possible way to do it?&lt;/p&gt;
&lt;p&gt;Thanks in Advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>