<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Text Origin position changes when it should remain the same. in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11463434#M32085</link>
    <description>&lt;P&gt;Someone please explain to me how the Text.Origin works because I just can't understand why it would change without an explanation.&amp;nbsp; In order to demonstrate the problem I have added the same statement back to back for a total of 4 lines.&amp;nbsp; As I step through the code the Text Origin (x,y) changes even through the statements are identical.&amp;nbsp; I have dPosition = oDimension.Text.Origin.x so that oPosition value should not be changing, but it does.&amp;nbsp; Instead of using oPosition I tried setting the oDimension.Text.Origin = (dPosition,0) but of course it did not like that.&amp;nbsp; Please watch the video and tell me why at the very end the text origin values change between the same command being ran.&amp;nbsp; It only changes between the first time and second time.&amp;nbsp; The third and fourth time it remains the same as I would think it should.&amp;nbsp; What is even more interesting, is the value for the dPosition is -9.01809283345083 and as you can see in the video, but if I run another macro immediately after that to see what the x value is instead it is -9.1039932852577.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the video, pay attention to where the 2.125 dimension moves to while the code is being stepped through.&amp;nbsp; Here is a link to the video:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fautode.sk%2F3EfxdSZ&amp;amp;data=05%7C01%7Cshastu%40bradburyco.com%7C4fbaf3d1c703488fffbd08daa6d4032a%7Ca4049eaf4d8e48a0a2b63dd13746d6f1%7C0%7C0%7C638005726793076872%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=UPv7YlZYfNdw%2FIM3z8XxryJDkiJXsSLsRAprCmnJHyE%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;https://autode.sk/3EfxdSZ&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 13:31:18 GMT</pubDate>
    <dc:creator>shastu</dc:creator>
    <dc:date>2022-10-05T13:31:18Z</dc:date>
    <item>
      <title>Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11463434#M32085</link>
      <description>&lt;P&gt;Someone please explain to me how the Text.Origin works because I just can't understand why it would change without an explanation.&amp;nbsp; In order to demonstrate the problem I have added the same statement back to back for a total of 4 lines.&amp;nbsp; As I step through the code the Text Origin (x,y) changes even through the statements are identical.&amp;nbsp; I have dPosition = oDimension.Text.Origin.x so that oPosition value should not be changing, but it does.&amp;nbsp; Instead of using oPosition I tried setting the oDimension.Text.Origin = (dPosition,0) but of course it did not like that.&amp;nbsp; Please watch the video and tell me why at the very end the text origin values change between the same command being ran.&amp;nbsp; It only changes between the first time and second time.&amp;nbsp; The third and fourth time it remains the same as I would think it should.&amp;nbsp; What is even more interesting, is the value for the dPosition is -9.01809283345083 and as you can see in the video, but if I run another macro immediately after that to see what the x value is instead it is -9.1039932852577.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the video, pay attention to where the 2.125 dimension moves to while the code is being stepped through.&amp;nbsp; Here is a link to the video:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fautode.sk%2F3EfxdSZ&amp;amp;data=05%7C01%7Cshastu%40bradburyco.com%7C4fbaf3d1c703488fffbd08daa6d4032a%7Ca4049eaf4d8e48a0a2b63dd13746d6f1%7C0%7C0%7C638005726793076872%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=UPv7YlZYfNdw%2FIM3z8XxryJDkiJXsSLsRAprCmnJHyE%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;https://autode.sk/3EfxdSZ&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 13:31:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11463434#M32085</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-05T13:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11506894#M32086</link>
      <description>&lt;P&gt;No one?&amp;nbsp; This is causing me serious problems and I need someone to explain this to me.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11506894#M32086</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-25T13:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11507682#M32087</link>
      <description>&lt;P&gt;I'm able to duplicate the issue you're seeing.&amp;nbsp; Since you can't manipulate Origin directly, I'm assuming that the setter for Origin, on the Inventor side, has some extra position validation code.&amp;nbsp; It acts like the coordinates are coming from a user drag of a dimension.&amp;nbsp; Dimensions have "soft" stops when dragging to help you with consistent placement and to keep you from putting text over extension lines and such.&amp;nbsp; I couldn't say for certain without seeing your code, but I think Inventor is bumping you off of positions like it would if you dragged the dimension.&amp;nbsp; In my testing, I had a diameter dimension that I had to assign Origin three times for it to stick.&amp;nbsp; Do yours eventually go in the right place?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 17:44:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11507682#M32087</guid>
      <dc:creator>jjstr8</dc:creator>
      <dc:date>2022-10-25T17:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11507930#M32088</link>
      <description>&lt;P&gt;I am noticing the same problem with hole notes.&amp;nbsp; The y positioning works as expected, but the x position does not.&amp;nbsp; See video.&amp;nbsp; No matter where I place the hole note, if I change the y position to 0 it goes down to the same y location every time.&amp;nbsp; If I then leave the y position and just move the x dimension, it should go to the same location each time left or right, but it doesn't.&amp;nbsp; In fact, the further out I move the hole note, the further out it moves when it should be going to zero.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 19:33:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11507930#M32088</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-25T19:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11509727#M32089</link>
      <description>&lt;P&gt;Hole notes seem to be worse.&amp;nbsp; The X position goes back and forth with each successive setting of Origin.&amp;nbsp; I also cannot figure out how you're supposed to handle the leader segments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;:&amp;nbsp; Can you shed some light on this?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:12:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11509727#M32089</guid>
      <dc:creator>jjstr8</dc:creator>
      <dc:date>2022-10-26T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11509765#M32090</link>
      <description>&lt;P&gt;I agree.&amp;nbsp; it works perfectly if I only change the y value so my logic seems to be correct, but trying to change just the x direction does not work the same way.&amp;nbsp; If I set it to 0, it should go to 0 every time, but it doesn't.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11509765#M32090</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-26T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11511880#M32091</link>
      <description>&lt;P&gt;I created a small test code.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim doc As DrawingDocument = ThisDoc.Document
Dim sheet As Sheet = doc.ActiveSheet

Dim dimension = sheet.DrawingDimensions.Item(1)

Dim p1 = ThisApplication.TransientGeometry.CreatePoint2d(dimension.Text.Origin.X, dimension.Text.Origin.Y)
Dim p2 = ThisApplication.TransientGeometry.CreatePoint2d(dimension.Text.Origin.X - 10, dimension.Text.Origin.Y)

dimension.Text.Origin = p2
MsgBox("stop")
dimension.Text.Origin = p2
MsgBox("stop")
dimension.Text.Origin = p2
MsgBox("stop")
dimension.Text.Origin = p1
MsgBox("stop")
dimension.Text.Origin = p1
MsgBox("stop")
dimension.Text.Origin = p1
MsgBox("stop")&lt;/LI-CODE&gt;
&lt;P&gt;And I could not reproduce the problem. Can you create a simple piece of test code to reproduce this problem? &lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 07:07:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11511880#M32091</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-10-27T07:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512736#M32092</link>
      <description>&lt;P&gt;I have attached a file with a drawing in it.&amp;nbsp; Open the drawing and run the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub showproblem()&lt;BR /&gt;Dim oApp As Inventor.Application&lt;BR /&gt;Set oApp = ThisApplication&lt;/P&gt;&lt;P&gt;Dim oDDoc As DrawingDocument&lt;BR /&gt;Set oDDoc = oApp.ActiveDocument&lt;BR /&gt;Dim oSheet As sheet&lt;BR /&gt;Set oSheet = oDDoc.ActiveSheet&lt;BR /&gt;Dim oDDims As DrawingDimensions&lt;BR /&gt;Set oDDims = oSheet.DrawingDimensions&lt;BR /&gt;Dim oDDim As DrawingDimension&lt;BR /&gt;Dim oLGDim As OrdinateDimension&lt;BR /&gt;oDDoc.SelectSet.Clear&lt;BR /&gt;Dim oOColl As ObjectCollection&lt;BR /&gt;Set oOColl = oApp.TransientObjects.CreateObjectCollection&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For Each oDDim In oDDims&lt;BR /&gt;If TypeOf oDDim Is OrdinateDimension Then&lt;BR /&gt;Set oLGDim = oDDim&lt;BR /&gt;If oLGDim.DimensionType = kHorizontalDimensionType Then&lt;BR /&gt;Call oOColl.Add(oDDim)&lt;BR /&gt;End If&lt;BR /&gt;End If&lt;BR /&gt;Skipthis:&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Call oDDoc.SelectSet.SelectMultiple(oOColl)&lt;BR /&gt;Call showProblem2part&lt;BR /&gt;End Sub&lt;BR /&gt;Sub showProblem2part()&lt;BR /&gt;Dim oApp As Inventor.Application&lt;BR /&gt;Set oApp = ThisApplication&lt;/P&gt;&lt;P&gt;Dim oDrawDoc As DrawingDocument&lt;BR /&gt;Set oDrawDoc = oApp.ActiveDocument&lt;/P&gt;&lt;P&gt;' Determine how many dimensions are in the select set.&lt;BR /&gt;Dim oSelectSet As SelectSet&lt;BR /&gt;Set oSelectSet = oDrawDoc.SelectSet&lt;BR /&gt;Dim colDimensions As New Collection&lt;BR /&gt;Dim i As Long&lt;BR /&gt;For i = 1 To oSelectSet.count&lt;BR /&gt;If TypeOf oSelectSet.Item(i) Is DrawingDimension Then&lt;BR /&gt;' Add any dimensions to the collection. We need to save them&lt;BR /&gt;' in something besides the selection set because once we start&lt;BR /&gt;' manipulating them the select set will be cleared.&lt;BR /&gt;colDimensions.Add oSelectSet.Item(i)&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;For i = 1 To colDimensions.count&lt;BR /&gt;Dim oDimension As DrawingDimension&lt;BR /&gt;Set oDimension = colDimensions.Item(i)&lt;/P&gt;&lt;P&gt;If i = 1 Then&lt;BR /&gt;' Get the position of the first dimension text. This is&lt;BR /&gt;' the position the other dimensions will be aligned to.&lt;BR /&gt;Dim dPosition As Double&lt;BR /&gt;dPosition = oDimension.Text.Origin.x - 0.2&lt;BR /&gt;Else&lt;BR /&gt;If i = 2 Then&lt;BR /&gt;dPositionY = oDimension.Text.Origin.y&lt;BR /&gt;TopDim = oDimension.Text.Text&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;' Change the position of the dimension.&lt;BR /&gt;Dim oPosition As Point2d&lt;BR /&gt;Set oPosition = oDimension.Text.Origin&lt;/P&gt;&lt;P&gt;oPosition.x = dPosition&lt;BR /&gt;'End If&lt;BR /&gt;'I don't understand why I have to run the below line twice, but it gets it closer to where it is supposed to be.&lt;BR /&gt;oDimension.Text.Origin = oPosition&lt;BR /&gt;oDimension.Text.Origin = oPosition&lt;BR /&gt;If TopDim = "used" Then GoTo SkipTopDim&lt;BR /&gt;TopDim = oDimension.Text.Text&lt;BR /&gt;If TopDim = findDim Then&lt;BR /&gt;oStr = " REF"&lt;BR /&gt;oDimension.Text.FormattedText = oStr&lt;BR /&gt;TopDim = "used"&lt;BR /&gt;End If&lt;BR /&gt;If TopDim = findDim2 Then&lt;BR /&gt;oStr = " REF"&lt;BR /&gt;oDimension.Text.FormattedText = oStr&lt;BR /&gt;TopDimValue = TopDim&lt;BR /&gt;TopDim = "used"&lt;BR /&gt;End If&lt;BR /&gt;SkipTopDim:&lt;BR /&gt;&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you set the oDimension.Text.Origin to a value that value should place the text at the exact location specified, but it doesn't.&amp;nbsp; I have proven that by running the code twice in a row without the oPosition changing, or at least it shouldn't change, but it does.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:25:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512736#M32092</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-27T13:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512766#M32093</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;:&amp;nbsp; Try your code again with the text for a hole thread note.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512766#M32093</guid>
      <dc:creator>jjstr8</dc:creator>
      <dc:date>2022-10-27T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512823#M32094</link>
      <description>&lt;P&gt;Below is a simplified code just to prove my point for the hole thread notes.&amp;nbsp; Run this code multiple times and you will see the note jump back and forth between positions instead of going to the 0 position and staying there.&amp;nbsp; Also if you move the hole note before running the code you will see that it does not go to the same position as it did the first time you ran it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Test()&lt;/P&gt;&lt;P&gt;Dim oApp As Inventor.Application&lt;/P&gt;&lt;P&gt;Set oApp = ThisApplication&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oDDoc As DrawingDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oDDoc = oApp.ActiveDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oSheet As Sheet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oSheet = oDDoc.ActiveSheet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oHoleNotes As HoleThreadNotes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oHoleNotes = oSheet.DrawingNotes.HoleThreadNotes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objPoint2D = Nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oHN As HoleThreadNote&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Each oHN In oHoleNotes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oPosition = oHN.Text.Origin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oPosition.x = 0&lt;/P&gt;&lt;P&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; oPosition.y = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oHN.Text.Origin = oPosition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:53:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11512823#M32094</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-27T13:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513047#M32095</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/43900"&gt;@shastu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure I understand the behavior, but if you toggle the HideValue option it seems to "fix" the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank" rel="noopener"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oHN&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;HoleThreadNote&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oHN&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oHoleNotes&lt;/SPAN&gt;
	&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;oHN.HideValue = True&lt;/STRONG&gt;&lt;/FONT&gt;
	&lt;SPAN&gt;oPosition&lt;/SPAN&gt; = &lt;SPAN&gt;oHN&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt;.&lt;SPAN&gt;Origin&lt;/SPAN&gt;
	&lt;SPAN&gt;oPosition&lt;/SPAN&gt;.&lt;SPAN&gt;X&lt;/SPAN&gt; = 0
	&lt;SPAN&gt;'oPosition.X = 0&lt;/SPAN&gt;
	&lt;SPAN&gt;oHN&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt;.&lt;SPAN&gt;Origin&lt;/SPAN&gt; = &lt;SPAN&gt;oPosition&lt;/SPAN&gt;	
	&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;oHN.HideValue = False&lt;/STRONG&gt;&lt;/FONT&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 18:32:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513047#M32095</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2022-10-27T18:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513076#M32096</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;:&amp;nbsp; Strange behavior indeed.&amp;nbsp; I'm not sure how you even thought to do that.&amp;nbsp; I don't know if that solves every case, since you don't seem to have control over the last leg of the leader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/43900"&gt;@shastu&lt;/a&gt;&amp;nbsp;:&amp;nbsp; I saw your other post that Mike Deck replied to.&amp;nbsp; Is placing a new annotation using the information from the current annotation but with a new location an option?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:07:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513076#M32096</guid>
      <dc:creator>jjstr8</dc:creator>
      <dc:date>2022-10-27T15:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513196#M32097</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I don't understand why that works, but it is a great work around!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:52:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513196#M32097</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-27T15:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513215#M32098</link>
      <description>&lt;P&gt;Disregard this.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 16:42:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11513215#M32098</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-27T16:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11520566#M32099</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/43900"&gt;@shastu&lt;/a&gt;&amp;nbsp;, here's a modified version of your macro for moving dimensions. To make it work, I narrowed it down to ordinate dimensions. I also added an option to handle either horizontal or vertical dimensions.&lt;BR /&gt;It deals with two things:&lt;BR /&gt;1. The OrdinateDimension.Text.Origin point is at the center of the text. So if you want to align the right edge of the text with another dimension, you have to subtract half the width of the text to get the point you want. The RangeBox property gives you a box around the text.&lt;BR /&gt;2. In some cases, it's not enough to move the&amp;nbsp;OrdinateDimension.Text.Origin. You also have to move points on the leader line. There are two points available: OrdinateDimension.JogPointOne and&amp;nbsp;OrdinateDimension.JogPointTwo. These are always there, even if the line is perfectly horizontal or vertical. They can sometimes put constraints on the text such that the text just won't move where you want unless you also move them.&lt;BR /&gt;&lt;BR /&gt;So this macro will do that. Please try it out. Maybe it's more complicated than it needs to be. It will try to evenly space the jog points, which is not absolutely necessary. But it makes it easier to do manual adjustments if you end up wanting a jog in the line.&lt;BR /&gt;&lt;BR /&gt;It might be a good idea for Autodesk to add a new function to do this, something like&lt;BR /&gt;OrdinateDimension.MoveText()&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 15:38:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11520566#M32099</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2022-10-31T15:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11521098#M32100</link>
      <description>&lt;P&gt;HOLY SMOKES!!!&amp;nbsp; That seems crazy to have to do all of that, but it does work.&amp;nbsp; I would never have been able to come up with that.&amp;nbsp; Your amazing.&amp;nbsp; Thank you so much.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 19:10:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11521098#M32100</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-10-31T19:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523005#M32101</link>
      <description>&lt;P&gt;Mike,&amp;nbsp; That took me a bit to figure out how to apply that into my code as I do not have user interaction of them typing in H or V and I need it to do both, not one or the other.&amp;nbsp; I also still need to capture different values depending on which ones it is doing where as your code was just capuring the code for the Horizontal dimensions.&amp;nbsp; Anyway, I was finally able to get everything figured out and it made me think of a question I would like to ask you.&amp;nbsp; I have been writing code for quite a while, but it is not what I do on a regular basis so I am no expert obviously.&amp;nbsp; When going from one procedure to another I have always just used calls and passed the information from one procedure to another.&amp;nbsp; I noticed that you are sometimes using functions and sometimes using calls.&amp;nbsp; My question is, can you give me an explanation as to when you use a function and when you use a call?&amp;nbsp; It probably should be obvious to me and if I thought about it long enough, I could probably figure out your reasoning, but just wanted to make sure I wasn't missing any other reasoning.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 14:32:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523005#M32101</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-11-01T14:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523159#M32102</link>
      <description>&lt;P&gt;If you have a procedure that produces a new output that you're going to use right away after you call it, then it's best to make that procedure a Function. Especially if the output is a single value. Then you can just return it from the function. For instance:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Function GetCoordinate(pt As Point2d, axis As Integer) As Double&lt;/LI-CODE&gt;
&lt;P&gt;returns a single value of type Double.&lt;BR /&gt;And you can easily call that function and get that return value with code like this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt; Dim attachX As Double
 attachX = GetCoordinate(attachPt, moveAxis)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;SetCoordinate, on the other hand, doesn't need to return anything. It produces output, but it does it by modifying a point object, which is one of its arguments. So a Sub is fine for&amp;nbsp;SetCoordinate, and Call can be used to call a Sub.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub SetCoordinate(pt As Point2d, axis As Integer, newValue As Double)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:22:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523159#M32102</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2022-11-01T15:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523231#M32103</link>
      <description>&lt;P&gt;O.K.&amp;nbsp; Thanks for the explanation.&amp;nbsp; One more final question and then I will be done asking on this post.&amp;nbsp; You know how you are controlling the points of the ordinate dimension leaders (pt1 and pt2)?&amp;nbsp; Can you do the same thing with chamfer notes?&amp;nbsp; I looked but did not see a way to control the Y direction of the chamfer leader note.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:45:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523231#M32103</guid>
      <dc:creator>shastu</dc:creator>
      <dc:date>2022-11-01T15:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Text Origin position changes when it should remain the same.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523305#M32104</link>
      <description>&lt;P&gt;Yes, you can move the points on a chamfer note leader. The ChamferNote object has a Leader property. (This object is also available on other note objects.) The Leader object is described &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=Leader" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. It contains nodes of type LeaderNode. These are the points on the leader, with additional data. Each LeaderNode has a Position property, which is of type Point2d. You would modify that to move the leader point.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 16:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/text-origin-position-changes-when-it-should-remain-the-same/m-p/11523305#M32104</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2022-11-01T16:16:18Z</dc:date>
    </item>
  </channel>
</rss>

