<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape</link><description>I resume this old discussion of 2016 and I ask .... in the event that we find a complex form (MSDelementtyPecomplexshape) how the function should be changed to be able to elevate a shape that contains two arches and two lines.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/781085?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 10:21:14 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:774aaccf-08f8-46e7-b413-faca8f329b8e</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Thanks, Jan. I will do that. Cheers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/781082?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 10:05:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2431e282-84f1-4573-bcef-d005a7db74e4</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/781080"]I was curious how could I make it work for 3D elements[/quote]
&lt;p&gt;I recommend to ask in a new post, because this whole thread started with another question from somebody else several months ago.&lt;/p&gt;
[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/781080"]Obviously, when running the script with a 3D element selected, it will throw an error (&amp;quot;Element has not beed added to a model&amp;quot;), when executing the Rewrite bit.&amp;nbsp; Any ideas, please ?[/quote]
&lt;p&gt;Did you check what element is the first in array? What type? Has it element id? &lt;/p&gt;
&lt;p&gt;Without knowing source data, it&amp;#39;s hard to guess.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/781080?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 09:29:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6596a077-a87e-4e45-b80e-ea30b28e9a61</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Hey Jon, sorry for bringing this up again. Following you and Jan&amp;#39;s advices, I&amp;#39;ve got this script working perfectly for any 2D elements. However, I was curious how could I make it work for 3D elements (such as meshes, smart solids or surfaces). Obviously, when running the script with a 3D element selected, it will throw an error (&amp;quot;Element has not beed added to a model&amp;quot;), when executing the Rewrite bit.&amp;nbsp; Any ideas, please ?&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;    Dim ele As Element
    Dim myArray() As Element
    Dim oPH As PropertyHandler
    Dim trns As Transform3d
    Dim translation As Point3d
    
    myArray = ActiveModelReference.GetSelectedElements.BuildArrayFromContents
    Set ele = myArray(0)
        
    Set oPH = CreatePropertyHandler(ele)
    oPH.SelectByAccessString (&amp;quot;RangeLow&amp;quot;)
    cpoint = oPH.GetValueAsPoint3d
    Debug.Print &amp;quot;This element&amp;#39;s low point is: &amp;quot; &amp;amp; cpoint.Z
    
    newElev = 103
    ZAxis = newElev - cpoint.Z
    translation = Point3dFromXYZ(0, 0, ZAxis)
    &amp;#39;trns = Transform3dFromPoint3d(translation)                                             &amp;#39;method 1
    &amp;#39;trns = Transform3dFromMatrix3dPoint3d(Matrix3dFromScaleFactors(1, 1, 1), translation)  &amp;#39;method 2
    &amp;#39;trns = Transform3dFromMatrix3dPoint3d(Matrix3dIdentity, translation)                   &amp;#39;method 3
    trns = Transform3dFromPoint3d(translation)                                              &amp;#39;method 4
    
    ele.Transform trns
    ele.Rewrite&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770442?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 07:25:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:22f54222-0c45-411a-a847-7d1445e361d2</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Jon, thank you for your patience. &lt;br /&gt;By using the method you suggested I&amp;#39;ve managed to get the code working, but it&amp;#39;s doing the same thing as the previous method (see below), which is adding the specified value (10 in this case) to the current elevation of the element. What I am trying to achieve is translate the element to that specific elevation, not add up to the existing one. Does it make sense ?&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; ele.Transform Transform3dFromMatrix3dPoint3d(Matrix3dFromScaleFactors(1, 1, 1), Point3dFromXYZ(0, 0, 10))&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So I am guessing what I need to do is to deconstruct the complex element, figure out the lowest elevation point and then translate the element by using a subtraction operation, either on the positive Z or negative Z.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770441?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 07:09:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f3cc6647-2d51-4078-b951-17deba88da11</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770370"]&lt;pre&gt;m1 = Matrix3dFromAxisAndRotationAngle(ZAxis, 0) &amp;#39;no rotation angle, just translation&lt;/pre&gt;[/quote]
&lt;p&gt;You&amp;#39;re failing to understand the mechanics of matrices.&amp;nbsp; A &lt;code&gt;Matrix3d&lt;/code&gt; can convey rotation, scaling or skew but not translation.&lt;/p&gt;
[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770393"]I am just looking for something that would do a translation[/quote]
&lt;p&gt;You need a &lt;code&gt;Transform3d&lt;/code&gt; to perform translation.&lt;/p&gt;
[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770393"]I should multiply the Matrix3dIdentity by a translation matrix[/quote]
&lt;p&gt;Why do you think that?&amp;nbsp; You need a transformation matrix.&amp;nbsp; If you want only to translate then rotation and scaling don&amp;#39;t enter the equation, and no rotation matrix is required.&amp;nbsp; Where the &lt;em&gt;Transform3d&lt;/em&gt; API requires a rotation matrix, use the no-op &lt;code&gt;Matrix3dIdentity&lt;/code&gt;.&amp;nbsp; In some cases, the identity matrix is supplied invisibly...&lt;/p&gt;
&lt;pre&gt;Transform3d = Transform3dFromPoint3d (translation) &amp;#39; Returns a transformation with identity matrix part &lt;/pre&gt;
&lt;p&gt;That&amp;#39;s the same as writing this...&lt;/p&gt;
&lt;pre&gt;Transform3d = Transform3dFromMatrix3dPoint3d (Matrix3dIdentity, translation)&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770393?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 19:40:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f24fc59d-5cb1-4339-b9ed-674a5fd6f7a4</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Hey Jan,&lt;/p&gt;
&lt;p&gt;Thank you for your quick reply. I do apologize for not formatting the code properly - will keep that in mind.&lt;br /&gt;&lt;br /&gt;You are probably right, I might have used the wrong 3dMatrix component. I am just looking for something that would do a translation along the Z axis (no rotation or scaling) and I was trying different things, in hope that something will work. I know I should multiply the Matrix3dIdentity by a translation matrix, but I am not sure what is the exact matrix that does that.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770373?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 17:48:15 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:cc2dc08a-12e0-4efa-8a40-b5a2a31ac61a</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;at first, please use &lt;em&gt;Insert &amp;gt; Insert Code&lt;/em&gt; tool, when you want to share any code snippet (even one line only). It ensures it&amp;#39;s displayed better.&lt;/p&gt;
[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770370"]Matrix3dFromAxisAndRotationAngle(ZAxis, 0) &amp;#39;no rotation angle, just translation[/quote]
&lt;p&gt;What looks like a bug to me is that you use variable named ZAxis, but it&amp;#39;s used to define rotation around X (0), not about Z (value should be 2).&lt;/p&gt;
&lt;p&gt;Also, it&amp;#39;s not clear where ZAxis comes from and what is its value.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770370?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 17:11:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:cae5a015-590e-4b5d-a089-6056647a4733</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried using an example of IdentityMatrix I&amp;#39;ve found on your site (slightly adapted), but it does not work. No errors, just not doing anything. What am I doing wrong, please ?&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m1 As Matrix3d&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m2 As Matrix3d&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim multiplication As Matrix3d&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZAxis = 10&amp;nbsp;&amp;nbsp; &amp;#39;this is the elevation value the element needs to be translated to&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; origin = Point3dFromXYZ(0, 0, ZAxis)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m1 = Matrix3dFromAxisAndRotationAngle(ZAxis, 0) &amp;#39;no rotation angle, just translation&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m2 = Matrix3dIdentity&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; multiplication = Matrix3dFromMatrix3dTimesMatrix3d(m1, m2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trns = Application.Transform3dFromMatrix3dAndFixedPoint3d(multiplication, origin)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770313?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 13:23:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6e9899d2-028c-484e-adcf-d5e3a5613010</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770285"] The problem is with the &amp;quot;matrix&amp;quot; component[/quote]
&lt;p&gt;If you&amp;#39;re not interested in rotation, then supply the &lt;a title="Wikipedia: Identity Matrix" href="https://en.wikipedia.org/wiki/Identity_matrix" rel="noopener noreferrer" target="_blank"&gt;identity matrix&lt;/a&gt; &lt;code&gt;Matrix3dIdentity&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770285?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 10:55:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bd1d5e74-a882-4933-a99a-aff358520d5e</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Thanks, Jon. That confirms to me that I was on the right path, but got lost in the woods.&lt;/p&gt;
&lt;p&gt;The general syntax of that method is :&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;trns = Transform3dFromMatrix3dAndFixedPoint3d(matrix, origin)&lt;span style="color:#000000;"&gt;, where origin is the pivot (3D point). The problem is with the &amp;quot;matrix&amp;quot; component, which is a placeholder for a transformational matrix (or a Matrix3d type), if I understand correctly. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#000000;"&gt;But when I am referring to the Microstation VBA help, looking up &amp;quot;Matrix3d Type&amp;quot; returns a wall of text, with a bunch of matrix subtypes. And I am completely lost there. &lt;br /&gt;Could you please tell me which one is the best one to be used for translation operations ? I am guessing one of two&amp;nbsp; : &lt;br /&gt;- &lt;span style="color:#3366ff;"&gt;Matrix3dFromVectorAndRotationAngle&lt;/span&gt; (however, I&amp;#39;ve tried changing the Z vector values and didn&amp;#39;t work)&lt;br /&gt;- &lt;span style="color:#3366ff;"&gt;Matrix3dFromMatrix3dTimesMatrix3d&lt;/span&gt;, which returns the product of two matrices. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#000000;"&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#000000;"&gt;Paul&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770256?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 06:46:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4e981d6c-5c01-42ec-a580-6e21a2abf08f</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1126928" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/770182"]&lt;span style="color:#0000ff;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#0000ff;"&gt;Transform3dFromMatrix3dPoint3d(...)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br data-uw-rm-sr="" /&gt;However, instead of translating it to the specified elevation (10, in this case), it will simply add 10 to the existing elevation[/quote]
&lt;p&gt;From VBA help: &lt;cite&gt;Returns a transformation from given matrix and translation parts&lt;/cite&gt;.&amp;nbsp; So, yes, in your example it does what is expected.&lt;/p&gt;
&lt;p&gt;There are a lot of methods that work with &lt;code&gt;Transform3d&lt;/code&gt;: search for &lt;em&gt;Transform3d Type&lt;/em&gt; in VBA help.&amp;nbsp; Perhaps &lt;code&gt;Transform3dFromMatrix3dAndFixedPoint3d&lt;/code&gt; will do what you want?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/770182?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 18:58:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3d79501e-a35e-4f4b-9dac-d6ada93314a3</guid><dc:creator>Paul Mitache</dc:creator><description>&lt;p&gt;Hey Jon, first of all, thank you for your advices, I&amp;#39;ve found them super useful.&lt;br /&gt;&lt;br /&gt;Taking Tiziano&amp;#39;s problem a bit further, I think we have 2 distinct situations, when trying to translate a ComplexChain or ComplexShape along the Z axis:&lt;/p&gt;
&lt;p&gt;1) flattening the element in the process - that is the easy part. The following code will do the job (will flatten the element and elevate it to 10m) : &lt;span style="color:#0000ff;"&gt;ele.Transform Transform3dFromMatrix3dPoint3d(Matrix3dFromScaleFactors(1, 1, 0), Point3dFromXYZ(0, 0, 10))&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;2) non-flattening transform. In theory, the following code should do :&lt;span style="color:#0000ff;"&gt; ele.Transform Transform3dFromMatrix3dPoint3d(Matrix3dFromScaleFactors(1, 1, 1), Point3dFromXYZ(0, 0, 10))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;However, instead of translating it to the specified elevation (10, in this case), it will simply add 10 to the existing elevation.&lt;br /&gt;What am I missing ?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737530?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 19:55:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8d2bf51b-c8cc-467e-b1bb-088bbbf673cb</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1095390" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/737519"]From what I seemed to understand with &amp;quot;transform3d&amp;quot;[/quote]
&lt;p&gt;Transforms are not specific to MicroStation VBA: they are a widely-used mathematical concept.&amp;nbsp; &lt;code&gt;Matrix3d&lt;/code&gt; and &lt;code&gt;Transform3d&lt;/code&gt; are MicroStation VBA representations of common objects.&amp;nbsp; Take a look at &lt;a title=" LA Solutions: VBA and Matrices" href="http://www.la-solutions.co.uk/content/connect/mvba/MVBA-Matrices.htm" rel="noopener noreferrer" target="_blank"&gt;this page&lt;/a&gt; and follow links to other sites.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737519?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 17:41:10 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:fca03af2-d1dc-4286-8abd-831386e64840</guid><dc:creator>Tiziano Sapora</dc:creator><description>&lt;div class="DVHrxd"&gt;
&lt;div id="ow71"&gt;
&lt;div&gt;
&lt;div class="DVHrxd"&gt;
&lt;div id="ow71"&gt;
&lt;div&gt;&lt;span&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;This weekend I work for us if I am able.&lt;/span&gt;&lt;/span&gt;&lt;span class="jCAhz"&gt;&lt;span class="ryNqvb"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;From what I seemed to understand with &amp;quot;transform3d&amp;quot; I can make changes in the position and size of the various objects that are part of a selection group.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz"&gt;&lt;span class="ryNqvb"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Thank you&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737398?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 06:30:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2246a371-9e5e-48ac-9bd0-40cb7628ce2c</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1095390" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/737028"]it can be made so that everything can be translated compared to the Z to a value specified by the user[/quote]
&lt;p&gt;Here&amp;#39;s an example you will find in VBA help...&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:seagreen;"&gt;&amp;#39; Flatten geometry to the plane z = 3&lt;/span&gt;
    Set oFlatElement = oElement.Clone
    oFlatElement.transform Transform3dFromMatrix3dPoint3d(Matrix3dFromScaleFactors(1, 1, 0), Point3dFromXYZ(0, 0, 3))
&lt;/pre&gt;
&lt;p&gt;It&amp;#39;s in topic &lt;b&gt;Flattening Elements&lt;/b&gt;: &lt;cite&gt;Demonstrates how to flatten geometry to any plane, specifically including constant-z planes (e.g. &amp;quot;SetZ&amp;quot;) &lt;/cite&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737116?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 06:00:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:57ecb8ea-f5b4-4e6d-91b6-364016e1591f</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Tiziano,&lt;/p&gt;
[quote userid="1095390" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape"]how the function should be changed to be able to elevate a shape that contains two arches and two lines.[/quote]
&lt;p&gt;in my opinion you choose wrong approach:&lt;/p&gt;
&lt;p&gt;I do not know a context of original discussion and code, but as Jon wrote, it is wrong to move vertices individually, when an element offers Transform method.&lt;/p&gt;
&lt;p&gt;Also, another wrong assumption is that code used for simple shape can be easily transformed to be used with complex shape. Sometimes yes, but often not. The shape is simple element, whereas ComplexShape is complex element, consisting from more different elements internally. It means to access the content works in a different way.&lt;/p&gt;
&lt;p&gt;And it is situation where Transform method makes sense, because it allows to manipulate with the whole element in a uniform way, regardless its type.&lt;/p&gt;
&lt;p&gt;Or you are interested in some internal modifications, so not to simple move the whole element in Z axis direction?&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737035?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 20:52:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:94b67168-4351-4bd9-928b-54b79d56c50b</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1095390" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape/737028"]I simply would like to adapt the previously attached code to make sure that given a complex shape consisting of two lines and two arches that enclose a text, it can be made so that everything can be translated compared to the Z to a value[/quote]
&lt;p&gt;Move away from individual DGN elements and look at a bigger picture.&lt;/p&gt;
&lt;p&gt;All graphic elements have a &lt;code&gt;Transform&lt;/code&gt; method.&amp;nbsp; That method takes a &lt;code&gt;Transform3d&lt;/code&gt; matrix.&amp;nbsp; Construct a &lt;code&gt;Transform3d&lt;/code&gt; using the many methods available.&amp;nbsp; See MicroStation VBA help for examples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737030?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 20:18:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:79f009e7-9167-4fd8-9211-c8f609a67922</guid><dc:creator>Tiziano Sapora</dc:creator><description>&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;correct&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &amp;quot;AsShapeElement&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737028?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 20:16:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6328faeb-61af-4d86-a5ab-6fae951d920d</guid><dc:creator>Tiziano Sapora</dc:creator><description>&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;I simply would like to adapt the previously attached code to make sure that given a complex shape consisting of two lines and two arches that enclose a text, it can be made so that everything can be translated compared to the Z to a value specified by the user.&lt;/span&gt;&lt;/span&gt; &lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;The attached code already does it but with a &amp;quot;msdelemendypeshape&amp;quot; type form&lt;/span&gt;&lt;/span&gt;&lt;span class="jCAhz"&gt;&lt;span class="ryNqvb"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Thank you&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinate modification z of a complex shape</title><link>https://communities.bentley.com/thread/737023?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 19:58:26 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6da995ec-57e2-4d5f-b09e-51028498596e</guid><dc:creator>Barry Lothian</dc:creator><description>[quote userid="1095390" url="~/products/programming/microstation_programming/f/microstation-programming---forum/237080/coordinate-modification-z-of-a-complex-shape"]how the function should be changed to be able to elevate a shape that contains two arches and two lines.[/quote]
&lt;p&gt;It&amp;rsquo;s not clear what you are trying to accomplish, can you share screenshots showing the before and after?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>