<?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 Re: How to change the sheet scale.? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13122094#M173490</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15812381"&gt;@leebrg&lt;/a&gt;.&amp;nbsp; Some of what you said did not make sense, or seemed to contradict itself, so I just wanted to clarify the details.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Sheet" target="_blank" rel="noopener"&gt;Sheet&lt;/A&gt;' does not have any 'scale' to it.&amp;nbsp; It only has a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Size" target="_blank" rel="noopener"&gt;Size&lt;/A&gt;&amp;nbsp;(from &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingSheetSizeEnum" target="_blank" rel="noopener"&gt;DrawingSheetSizeEnum&lt;/A&gt;), &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Height" target="_blank" rel="noopener"&gt;Height&lt;/A&gt;, &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Width" target="_blank" rel="noopener"&gt;Width&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;You want code that will place a single view of a model into a Sheet in a DrawingDocument.&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;That task will most likely be using the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingViews_AddBaseView" target="_blank" rel="noopener"&gt;DrawingViews.AddBaseView&lt;/A&gt;&amp;nbsp;method, but there are lots of similar methods for adding views into a drawing, so not sure at this point.&lt;/LI&gt;
&lt;LI&gt;While doing that, you want to control the size of the view it places, so that it fits within the Sheet, without changing the size (or orientation) of the Sheet.&lt;/LI&gt;
&lt;LI&gt;What about the orientation of the model within the view itself?
&lt;UL&gt;
&lt;LI&gt;We do not know what orientation your sheet is in (portrait or landscape).&lt;/LI&gt;
&lt;LI&gt;We do not know what direction this view should be looking at the model from.&lt;/LI&gt;
&lt;LI&gt;We do not know what orientation your model is in, or how you would prefer it to be oriented within the view on the sheet.&lt;/LI&gt;
&lt;LI&gt;Do you want the code to change the orientation of the view, if that will help it fit into the sheet better?&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This task would most likely require some relatively complex code that will measure the overall size of your model, in model space.&amp;nbsp; Determine its orientation based on which directions it is narrowest in, and which it is longest in.&amp;nbsp; Compare that to the size and orientation of the sheet.&amp;nbsp; Determine if it must avoid borders and/or title blocks within the bounds of that sheet.&amp;nbsp; If it must avoid those, then determine what area of the sheet is 'available' for a view, without overlapping the border or title block.&amp;nbsp; Use that interior available space to compare to the model's size &amp;amp; orientation.&amp;nbsp; Do the math to figure out what orientation will fit best, then what scale will be needed, and where within the bounds of that sheet to place the view.&amp;nbsp; Lots of complex stuff to be figured out, and lots of code to make all that happen.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2024 12:43:22 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2024-10-31T12:43:22Z</dc:date>
    <item>
      <title>How to change the sheet scale.?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13121917#M173486</link>
      <description>&lt;P&gt;I am developing a task to automate the transition from 3D model to drawing.&lt;BR /&gt;I am placing a model view whose size changes to a fixed sheet size and adjusting the scale of the model view to fit the sheet.&lt;BR /&gt;Is there a way to adjust the scale of the sheet size while the sheet size (A1) is fixed? The scale of the model view remains fixed.&lt;BR /&gt;It is not a change in the sheet size.&lt;/P&gt;&lt;P&gt;Instead of adjusting the model view scale to the sheet, I am wondering if there is a way to adjust the model view to fit the scale of the sheet itself so that it is located within the sheet.&lt;/P&gt;&lt;P&gt;Is there an i-logic code that can do that?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 11:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13121917#M173486</guid>
      <dc:creator>leebrg</dc:creator>
      <dc:date>2024-10-31T11:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the sheet scale.?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13122094#M173490</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15812381"&gt;@leebrg&lt;/a&gt;.&amp;nbsp; Some of what you said did not make sense, or seemed to contradict itself, so I just wanted to clarify the details.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A '&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Sheet" target="_blank" rel="noopener"&gt;Sheet&lt;/A&gt;' does not have any 'scale' to it.&amp;nbsp; It only has a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Size" target="_blank" rel="noopener"&gt;Size&lt;/A&gt;&amp;nbsp;(from &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingSheetSizeEnum" target="_blank" rel="noopener"&gt;DrawingSheetSizeEnum&lt;/A&gt;), &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Height" target="_blank" rel="noopener"&gt;Height&lt;/A&gt;, &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Sheet_Width" target="_blank" rel="noopener"&gt;Width&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;You want code that will place a single view of a model into a Sheet in a DrawingDocument.&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;That task will most likely be using the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingViews_AddBaseView" target="_blank" rel="noopener"&gt;DrawingViews.AddBaseView&lt;/A&gt;&amp;nbsp;method, but there are lots of similar methods for adding views into a drawing, so not sure at this point.&lt;/LI&gt;
&lt;LI&gt;While doing that, you want to control the size of the view it places, so that it fits within the Sheet, without changing the size (or orientation) of the Sheet.&lt;/LI&gt;
&lt;LI&gt;What about the orientation of the model within the view itself?
&lt;UL&gt;
&lt;LI&gt;We do not know what orientation your sheet is in (portrait or landscape).&lt;/LI&gt;
&lt;LI&gt;We do not know what direction this view should be looking at the model from.&lt;/LI&gt;
&lt;LI&gt;We do not know what orientation your model is in, or how you would prefer it to be oriented within the view on the sheet.&lt;/LI&gt;
&lt;LI&gt;Do you want the code to change the orientation of the view, if that will help it fit into the sheet better?&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This task would most likely require some relatively complex code that will measure the overall size of your model, in model space.&amp;nbsp; Determine its orientation based on which directions it is narrowest in, and which it is longest in.&amp;nbsp; Compare that to the size and orientation of the sheet.&amp;nbsp; Determine if it must avoid borders and/or title blocks within the bounds of that sheet.&amp;nbsp; If it must avoid those, then determine what area of the sheet is 'available' for a view, without overlapping the border or title block.&amp;nbsp; Use that interior available space to compare to the model's size &amp;amp; orientation.&amp;nbsp; Do the math to figure out what orientation will fit best, then what scale will be needed, and where within the bounds of that sheet to place the view.&amp;nbsp; Lots of complex stuff to be figured out, and lots of code to make all that happen.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 12:43:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13122094#M173490</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-10-31T12:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the sheet scale.?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13122206#M173494</link>
      <description>&lt;P&gt;Sheet don't have scale.&amp;nbsp; View does.&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Sub Main()
Dim oDoc As Document
Dim oIDWFile As DrawingDocument
Dim oSheet As Sheet
Dim oDrawingView As DrawingView
Dim oScale As String
Dim oTime As String

oTime = Now.ToShortDateString
iProperties.Value("Project", "Creation Date") = oTime

oScale = "1 / 10"
oDoc = ThisApplication.ActiveDocument
If oDoc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
	oIDWFile = TryCast(oDoc, DrawingDocument)
	oSheet = oIDWFile.ActiveSheet
	For Each oDrawingView In oSheet.DrawingViews
		Logger.Info(oDrawingView.ScaleString)
		If (oDrawingView.ViewType = DrawingViewTypeEnum.kStandardDrawingViewType) Or
			(oDrawingView.ViewType = DrawingViewTypeEnum.kProjectedDrawingViewType)
			'Assignment fail if same scale
			If oDrawingView.ScaleString &amp;lt;&amp;gt; oScale
				oDrawingView.ScaleString = oScale
			End If
		End If
	Next
	oSheet.Update
End If
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 31 Oct 2024 13:24:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-change-the-sheet-scale/m-p/13122206#M173494</guid>
      <dc:creator>Pineapple2024</dc:creator>
      <dc:date>2024-10-31T13:24:46Z</dc:date>
    </item>
  </channel>
</rss>

