<?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>hirotaka nisimura's Activities</title><link>https://communities.bentley.com/members/064cad3d_2d00_0ad7_2d00_4009_2d00_aac5_2d00_72d9f674d0a6</link><description>hirotaka nisimura's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>[CE UD17]3D PDF I created has no shadow.</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/252911/ce-ud17-3d-pdf-i-created-has-no-shadow</link><pubDate>Tue, 28 Nov 2023 00:05:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5901ca48-ffbe-4e47-a7f6-c8a77511701e</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I created a 3D tower in DGN and printed it to 3D PDF using PDF.pltcfg. It&amp;#39;s displayed with shadow in DGN but it has no shadow in PDF. Is there a way to print in PDF displaying like DGN? I attach images displaying in DGN and PDF.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/273/pastedimage1701129995898v3.png" alt=" " /&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/273/pastedimage1701129969019v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CE Update17] The previous MDL is loaded when DGN opening.</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/244648/ce-update17-the-previous-mdl-is-loaded-when-dgn-opening</link><pubDate>Thu, 27 Apr 2023 04:53:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2d33b2a5-e8f2-4364-94f2-d8398dc67950</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;Some MDL applications are automatically loaded immediate opening DGN again after DGN closed without MDL unloading. I remember that was not so in V8i. Is there a setting to be the same specification to V8i?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CE Update17 VBA]Fence.GetContents doesn&amp;#39;t get all elements</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/250998/ce-update17-vba-fence-getcontents-doesn-t-get-all-elements</link><pubDate>Fri, 06 Oct 2023 06:17:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dc4658db-e5c2-4c5d-b059-383df711f4fc</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;Hi, I had the vba project that cut elements inside a shape, change level of that and add to DGN, for V8i. Now I use it in CONNECT Edition, but there is a issue that it can&amp;#39;t get all elements inside a shape.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the case that an element and a shape are placed like below, Fence.GetContents can cut an element inside a shape. an element is a green line and a shape is a white rectangle.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/343173/pastedimage1696573113565v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But in the case of below, Fence.GetContents cut an element and get only the left side element. The right side element is not gotten.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/343173/pastedimage1696573137288v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I recognize that it works correctly that a fence cuts all elements inside a shape when I do all that manually. Please let tell us if there is who can explain about VBA Fence.GetContents.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CE Update17] I can&amp;#39;t set variables for the dialog of &amp;quot;Capture Screen&amp;quot;.</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/244465/ce-update17-i-can-t-set-variables-for-the-dialog-of-capture-screen</link><pubDate>Fri, 21 Apr 2023 02:29:37 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9ba07f6b-3fc8-4777-bf3f-d9bc17c67fdc</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to set the value for variables in the dialog of &amp;quot;Capture screen&amp;quot;, but it doesn&amp;#39;t work. I was able to do it in V8i. I get &amp;quot;screen.jpg&amp;quot; after the below code is excuted, but I hope to get &amp;quot;test.png&amp;quot;. Please tell me that the way to set those variables of the dialog.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Class module&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Option Explicit

Implements IModalDialogEvents

Private Sub IModalDialogEvents_OnDialogClosed(ByVal DialogBoxName As String, ByVal DialogResult As MsdDialogBoxResult)
    
End Sub

Private Sub IModalDialogEvents_OnDialogOpened(ByVal DialogBoxName As String, DialogResult As MsdDialogBoxResult)
    If DialogBoxName = &amp;quot;名前を付けて保存&amp;quot; Then
        CadInputQueue.SendKeyin &amp;quot;MDL COMMAND MGDSHOOK,fileList_setFilterCmd *.png&amp;quot;
        CadInputQueue.SendKeyin &amp;quot;MDL COMMAND MGDSHOOK,fileList_setDirectoryCmd &amp;quot; &amp;amp; ActiveDesignFile.Path &amp;amp; &amp;quot;\&amp;quot;
        CadInputQueue.SendKeyin &amp;quot;MDL COMMAND MGDSHOOK,fileList_setFileNameCmd &amp;quot; &amp;amp; &amp;quot;test.png&amp;quot;
        DialogResult = msdDialogBoxResultOK
    End If
End Sub&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Main module&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Option Explicit

Sub runTest()
    Dim mH As New CaptureModalHandler
    AddModalDialogEventsHandler mH
    CadInputQueue.SendKeyin &amp;quot;mdl load scrncapt;capture screen&amp;quot;
    RemoveModalDialogEventsHandler mH
End Sub&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CE VBA API] TrackPopupMenu don&amp;#39;t work.</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/242651/ce-vba-api-trackpopupmenu-don-t-work</link><pubDate>Thu, 09 Mar 2023 01:32:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a09d55ad-70bd-46be-91dd-661d24b31f23</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;When I use Microstation V8i, I have used VBA tool to show my custom popup menu. Recently, I edit it for CONNECT Edition, but it don&amp;#39;t work well. My code is below.&amp;nbsp;At the moment the problem is that popup menu is not shown. TrackPopupMenu API must show popup menu but it don&amp;#39;t work. If is there anyone who try to correct it, please tell me what is wrong.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Option Explicit

Private Declare PtrSafe Function FindWindow Lib &amp;quot;user32&amp;quot; Alias &amp;quot;FindWindowA&amp;quot; (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
Private Declare PtrSafe Function GetCursorPos Lib &amp;quot;user32&amp;quot; (lpPoint As POINTAPI) As Long

Private Type POINTAPI
    X As Long
    Y As Long
End Type

Private Declare PtrSafe Function GetWindowRect Lib &amp;quot;user32&amp;quot; (ByVal hwnd As LongPtr, lpRect As RECT) As Long

Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Private Declare PtrSafe Function TrackPopupMenu Lib &amp;quot;user32&amp;quot; (ByVal hMenu As LongPtr, ByVal wFlags As LongPtr, ByVal X As LongPtr, ByVal Y As LongPtr, ByVal nReserved As LongPtr, ByVal hwnd As LongPtr, lprc As RECT) As LongPtr
Private Const TPM_LEFTBUTTON = &amp;amp;H0&amp;amp;
Private Const TPM_RETURNCMD = &amp;amp;H100
Private Const TPM_LEFTALIGN = &amp;amp;H0&amp;amp;

Private Declare PtrSafe Function CreatePopupMenu Lib &amp;quot;user32&amp;quot; () As LongPtr
Private Declare PtrSafe Function InsertMenuItem Lib &amp;quot;user32&amp;quot; Alias &amp;quot;InsertMenuItemA&amp;quot; (ByVal hMenu As LongPtr, ByVal un As Long, ByVal bool As Long, ByRef lpcMenuItemInfo As MENUITEMINFO) As Long


Private Type MENUITEMINFO
    cbSize As Long
    fMask As Long
    fType As Long
    fState As Long
    wid As Long
    hSubMenu As LongPtr
    hbmpChecked As LongPtr
    hbmpUnchecked As LongPtr
    dwItemData As LongPtr
    dwTypeData As String
    cch As Long
End Type

&amp;#39; Constants required by MENUITEMINFO type
Private Const MIIM_STATE = &amp;amp;H1
Private Const MIIM_ID = &amp;amp;H2
Private Const MIIM_TYPE = &amp;amp;H10
Private Const MFT_STRING = &amp;amp;H0


&amp;#39; Variables declared at module level
Private Cut_Enabled As Long

Sub run()

    Dim hwnd As LongPtr
    Dim Poi As POINTAPI
    
    &amp;#39;Get handle of Microstation
    hwnd = FindWindow(vbNullString, Application.Caption)
    GetCursorPos Poi &amp;#39;Get cursor&amp;#39;s position
    
    Dim ppp As LongPtr
    ppp = CreatePopupMenu &amp;#39;Create popupmenu
    
    Dim menuItems(2) As MENUITEMINFO
    With menuItems(0)
        .cbSize = Len(menuItems(0))
        .fMask = MIIM_STATE Or MIIM_ID Or MIIM_TYPE
        .fType = MFT_STRING
        .fState = Cut_Enabled
        .wid = 1
        .dwTypeData = &amp;quot;A&amp;quot;
        .cch = Len(.dwTypeData)
    End With
    With menuItems(1)
        .cbSize = Len(menuItems(1))
        .fMask = MIIM_STATE Or MIIM_ID Or MIIM_TYPE
        .fType = MFT_STRING
        .fState = Cut_Enabled
        .wid = 2
        .dwTypeData = &amp;quot;B&amp;quot;
        .cch = Len(.dwTypeData)
    End With
    With menuItems(2)
        .cbSize = Len(menuItems(2))
        .fMask = MIIM_STATE Or MIIM_ID Or MIIM_TYPE
        .fType = MFT_STRING
        .fState = Cut_Enabled
        .wid = 3
        .dwTypeData = &amp;quot;C&amp;quot;
        .cch = Len(.dwTypeData)
    End With
    
    
    
    InsertMenuItem ppp, 0, True, menuItems(0)
    InsertMenuItem ppp, 1, True, menuItems(1)
    InsertMenuItem ppp, 2, True, menuItems(2)
    
    
    
    &amp;#39;------------------------------------Show popupmenu
    Dim oRECT As RECT
    GetWindowRect hwnd, oRECT
    Dim ret As LongPtr
    ret = TrackPopupMenu(ppp, TPM_RETURNCMD, Poi.X - 10, Poi.Y - 10, 0, hwnd, oRECT)
    
    
    MsgBox ret

End Sub&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[V8i] Can I execute the keyin &amp;quot;clipboard pastespecial&amp;quot; with an option?</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/240760/v8i-can-i-execute-the-keyin-clipboard-pastespecial-with-an-option</link><pubDate>Sun, 22 Jan 2023 02:44:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:005c42ce-0ddb-4bd3-957c-125fa47c600f</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I hope to execute the keyin &amp;quot;clipboard pastespecial&amp;quot; to paste a selection from Excel sheet to DGN. The dialog is showed to select an option when I excute the keyin, but is there any way to set an option to embed worksheet with keyin without the dialog?&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, 17 Jan 2022 01:50:48 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2a71bb20-2953-4135-967c-2a6123b493af</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>How to convert TIF to JPG using VBA ExportRasterFile?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/224579/how-to-convert-tif-to-jpg-using-vba-exportrasterfile</link><pubDate>Fri, 14 Jan 2022 11:52:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a9555115-a0a5-4226-a04a-db2a565ac093</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I wrote a VBA code to convert TIF to JPG, but it does not work. I get run time error 5 when I run my code. Can someone help me? I&amp;#39;m using Microstation v8i. My code is below one.&lt;/p&gt;
&lt;p&gt;RasterManager.ExportRasterFile sourcefilename:=fpath &amp;amp; &amp;quot;\&amp;quot; &amp;amp; fname, destinationfilename:=fpath &amp;amp; &amp;quot;\&amp;quot; &amp;amp; fso.GetBaseName(fname) &amp;amp; &amp;quot;.jpg&amp;quot;, NewFormatSpecifier:=RasterManager.RasterFormats.Find(&amp;quot;JPEG(J)&amp;quot;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Why is different a point3d of element and a point in range3d of element?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/195080/why-is-different-a-point3d-of-element-and-a-point-in-range3d-of-element</link><pubDate>Tue, 07 Apr 2020 07:32:14 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:48789b21-3175-4681-a196-ab38eab6df05</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I am writing a VBA program to get X size of an element. I tried 2 way.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using Startpoint and Endpoint of a line element.&lt;/li&gt;
&lt;li&gt;Using Range3d of&amp;nbsp;an element.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I tried above 2 ways, I would like to use Range3d, but I can&amp;#39;t get correct X size. Please tell me the reason why.&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, 20 Jun 2019 02:23:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:64602680-76b5-417b-a07d-bc1312d3a56b</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>[VBA] How to get the point projected to a bsplinesurface?</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/181348/vba-how-to-get-the-point-projected-to-a-bsplinesurface</link><pubDate>Thu, 20 Jun 2019 05:08:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d21ef036-d5e1-4de3-b240-9d20bba83bb8</guid><dc:creator>hirotaka nisimura</dc:creator><description>&lt;p&gt;I have a bsplinesurface and a point3d below bsplinesurface. I want to get the point projected to the bsplinesurface with vba. I tried some way.&lt;/p&gt;
&lt;p&gt;1, projectedpoint=bsplinesurface.ProjectPointOnPerpendicular(point3d, Matrix3dIdentity)&lt;/p&gt;
&lt;p&gt;I get a error after running it.&lt;/p&gt;
&lt;p&gt;2, point3d()=bsplinesurface.GetIntersectionPoints(lineelement, Matrix3dIdentity)&lt;/p&gt;
&lt;p&gt;I get a many points, but it is not a point that I want.&lt;/p&gt;
&lt;p&gt;3, &lt;span&gt;point3d()&lt;/span&gt;= bsplinecurve.IntersectSurface(Parameters,&amp;nbsp;SurfaceParameters, BsplineSurface)&lt;/p&gt;
&lt;p&gt;I get a error after running it. I guess that I made a mistake. I don&amp;#39;t know what I have to give as Parameters and SurfaceParameters...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can someone tell me the good way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>