<?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: Want to export DWG + PDF after converting inches to mm in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799416#M80852</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Question:&lt;BR /&gt;How come that you mentioned me, i was not in this topic yet.&lt;BR /&gt;This is no problem, but i am curious only.&lt;BR /&gt;&lt;BR /&gt;Good to hear that i could have helped you.&lt;BR /&gt;</description>
    <pubDate>Thu, 22 Feb 2018 13:21:13 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2018-02-22T13:21:13Z</dc:date>
    <item>
      <title>Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7794602#M80757</link>
      <description>&lt;P&gt;We need to open drawings change the dimensions units from IMPERIAL to METRIC and then export it to a specific folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can't make new styles so I want to change the thing in the picture I provided.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/465624i17F9345158CF0D8E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I already made the code to export all dwg's from a drawing. I now just need to change the inches to mm before I export.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I don't know how! Can anyone point me in the right direction here?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;'define the active document as an assembly file&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oAsmName&lt;/SPAN&gt; = &lt;SPAN&gt;Left&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;, &lt;SPAN&gt;Len&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;))
&lt;SPAN&gt;oRevNum&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Revision Number"&lt;/SPAN&gt;)

&lt;SPAN&gt;'check that the active document is an assembly file&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Please run this rule from the assembly file."&lt;/SPAN&gt;, &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;)
&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;'get user input&lt;/SPAN&gt;
&lt;SPAN&gt;RUsure&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt; ( _
&lt;SPAN&gt;"This will create a PDF file for all of the assembly components that have drawing (dwg) files."&lt;/SPAN&gt; _
&amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"This rule expects that the drawing file shares the same name and location as the component."&lt;/SPAN&gt; _
&amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" "&lt;/SPAN&gt; _
&amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"Are you sure you want to create PDF Drawings for all of the assembly components?"&lt;/SPAN&gt; _
&amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" "&lt;/SPAN&gt; _
&amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"This could take a while."&lt;/SPAN&gt;, &lt;SPAN&gt;"iLogic  - Batch Output PDFs "&lt;/SPAN&gt;,&lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNo&lt;/SPAN&gt;)

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;RUsure&lt;/SPAN&gt; = &lt;SPAN&gt;vbNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;Return&lt;/SPAN&gt;
&lt;SPAN&gt;Else&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;'- - - - - - - - - - - - -PDF setup - - - - - - - - - - - -&lt;/SPAN&gt;
&lt;SPAN&gt;oPath&lt;/SPAN&gt; = &lt;SPAN&gt;"G:\Wet &amp;amp; Dry Technology BV\Resato Snijmachine\EXPORT MAP"&lt;/SPAN&gt; 
&lt;SPAN&gt;PDFAddIn&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ApplicationAddIns&lt;/SPAN&gt;.&lt;SPAN&gt;ItemById&lt;/SPAN&gt;(&lt;SPAN&gt;"{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}"&lt;/SPAN&gt;)
&lt;SPAN&gt;oContext&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateTranslationContext&lt;/SPAN&gt;
&lt;SPAN&gt;oContext&lt;/SPAN&gt;.&lt;SPAN&gt;Type&lt;/SPAN&gt; = &lt;SPAN&gt;IOMechanismEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kFileBrowseIOMechanism&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateNameValueMap&lt;/SPAN&gt;
&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateDataMedium&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDWGAddIn&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TranslatorAddIn&lt;/SPAN&gt;
&lt;SPAN&gt;oDWGAddIn&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ApplicationAddIns&lt;/SPAN&gt;.&lt;SPAN&gt;ItemById&lt;/SPAN&gt;(&lt;SPAN&gt;"{C24E3AC2-122E-11D5-8E91-0010B541CD80}"&lt;/SPAN&gt;)
&lt;SPAN&gt;oDataMediumDWG&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateDataMedium&lt;/SPAN&gt;

&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"All_Color_AS_Black"&lt;/SPAN&gt;) = 0
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Remove_Line_Weights"&lt;/SPAN&gt;) = 0
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Vector_Resolution"&lt;/SPAN&gt;) = 400
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Sheet_Range"&lt;/SPAN&gt;) = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PrintRangeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kPrintAllSheets&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_Begin_Sheet"&lt;/SPAN&gt;) = 1
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_End_Sheet"&lt;/SPAN&gt;) = 1

&lt;SPAN&gt;'get PDF target folder path&lt;/SPAN&gt;
&lt;SPAN&gt;oFolder&lt;/SPAN&gt; = &lt;SPAN&gt;oPath&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oAsmName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"-PDF"&lt;/SPAN&gt;

&lt;SPAN&gt;'Check for the PDF folder and create it if it does not exist&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;Directory&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;oFolder&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;Directory&lt;/SPAN&gt;.&lt;SPAN&gt;CreateDirectory&lt;/SPAN&gt;(&lt;SPAN&gt;oFolder&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;'- - - - - - - - - - - - DWG SETUP - - - - - - - - - - - - - -  &lt;/SPAN&gt;

&lt;SPAN&gt;strIniFile&lt;/SPAN&gt; = &lt;SPAN&gt;"G:\Wet &amp;amp; Dry Technology BV\Algemeen\Folders Medewerkers\Veldkamp, Machiel\INVENTOR\iLogic\DWG_MODEL.ini"&lt;/SPAN&gt;  &lt;SPAN&gt;'INI FILE IS MODELSPACE&lt;/SPAN&gt;
&lt;SPAN&gt;' Create the name-value that specifies the ini file to use.&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Export_Acad_IniFile"&lt;/SPAN&gt;) = &lt;SPAN&gt;strIniFile&lt;/SPAN&gt;

&lt;SPAN&gt;'- - - - - - - - - - - - -Component Drawings - - - - - - - - - - - -&lt;/SPAN&gt;
&lt;SPAN&gt;'look at the files referenced by the assembly&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRefDocs&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DocumentsEnumerator&lt;/SPAN&gt;
&lt;SPAN&gt;oRefDocs&lt;/SPAN&gt; = &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt;.&lt;SPAN&gt;AllReferencedDocuments&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRefDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;'work the the drawing files for the referenced models&lt;/SPAN&gt;
&lt;SPAN&gt;'this expects that the model has a drawing of the same path and name&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRefDoc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oRefDocs&lt;/SPAN&gt;
	&lt;SPAN&gt;'CHANGE INCHES TO MM FIRST - AFTER THAT, EXPORT&lt;/SPAN&gt;
	&lt;SPAN&gt;dwgPathName&lt;/SPAN&gt; = &lt;SPAN&gt;Left&lt;/SPAN&gt;(&lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FullDocumentName&lt;/SPAN&gt;, &lt;SPAN&gt;Len&lt;/SPAN&gt;(&lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FullDocumentName&lt;/SPAN&gt;)-3) &amp;amp; &lt;SPAN&gt;"dwg"&lt;/SPAN&gt;
	&lt;SPAN&gt;'check to see that the model has a drawing of the same path and name&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt;(&lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;File&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;dwgPathName&lt;/SPAN&gt;)) &lt;SPAN&gt;Then&lt;/SPAN&gt;
				&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
				&lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;Documents&lt;/SPAN&gt;.&lt;SPAN&gt;Open&lt;/SPAN&gt;(&lt;SPAN&gt;dwgPathName&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;)
				&lt;SPAN&gt;oFileName&lt;/SPAN&gt; = &lt;SPAN&gt;Left&lt;/SPAN&gt;(&lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;, &lt;SPAN&gt;Len&lt;/SPAN&gt;(&lt;SPAN&gt;oRefDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;))&lt;SPAN&gt;'- 3)&lt;/SPAN&gt;
				&lt;SPAN&gt;'MessageBox.Show(oFileName, "Title")&lt;/SPAN&gt;


	            &lt;SPAN&gt;On&lt;/SPAN&gt; &lt;SPAN&gt;Error&lt;/SPAN&gt; &lt;SPAN&gt;Resume&lt;/SPAN&gt; &lt;SPAN&gt;Next&lt;/SPAN&gt; &lt;SPAN&gt;' if PDF exists and is open or read only, resume next&lt;/SPAN&gt;
	                 &lt;SPAN&gt;'Set the PDF target file name&lt;/SPAN&gt;
	                &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFileName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;".pdf"&lt;/SPAN&gt;
					&lt;SPAN&gt;oDataMediumDWG&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFileName&lt;/SPAN&gt;  &amp;amp; &lt;SPAN&gt;".dwg"&lt;/SPAN&gt;
	                &lt;SPAN&gt;'Write out the PDF&lt;/SPAN&gt;
	                &lt;SPAN&gt;PDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;)
					&lt;SPAN&gt;oDWGAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMediumDWG&lt;/SPAN&gt;)
	            	&lt;SPAN&gt;'close the file&lt;/SPAN&gt;
	                &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Close&lt;/SPAN&gt;
	&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;'If the model has no drawing of the same path and name - do nothing&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;'- - - - - - - - - - - - -Top Level Drawing - - - - - - - - - - - -&lt;/SPAN&gt;
&lt;SPAN&gt;oAsmDrawing&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ChangeExtension&lt;/SPAN&gt;(&lt;SPAN&gt;".dwg"&lt;/SPAN&gt;)
&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;Documents&lt;/SPAN&gt;.&lt;SPAN&gt;Open&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDrawing&lt;/SPAN&gt;, &lt;SPAN&gt;True&lt;/SPAN&gt;)
&lt;SPAN&gt;oAsmDrawingName&lt;/SPAN&gt; = &lt;SPAN&gt;Left&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;, &lt;SPAN&gt;Len&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;) -3)
&lt;SPAN&gt;'write out the PDF for the Top Level Assembly Drawing file&lt;/SPAN&gt;
&lt;SPAN&gt;On&lt;/SPAN&gt; &lt;SPAN&gt;Error&lt;/SPAN&gt; &lt;SPAN&gt;Resume&lt;/SPAN&gt; &lt;SPAN&gt;Next&lt;/SPAN&gt; &lt;SPAN&gt;' if PDF exists and is open or read only, resume next&lt;/SPAN&gt;
 &lt;SPAN&gt;'Set the PDF target file name&lt;/SPAN&gt;
&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oAsmDrawingName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;".pdf"&lt;/SPAN&gt;
&lt;SPAN&gt;'Write out the PDF&lt;/SPAN&gt;
&lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;PDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;)
&lt;SPAN&gt;oDataMediumDWG&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oAsmDrawingName&lt;/SPAN&gt;  &amp;amp; &lt;SPAN&gt;".dwg"&lt;/SPAN&gt;
&lt;SPAN&gt;oDWGAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMediumDWG&lt;/SPAN&gt;)
&lt;SPAN&gt;'Close the top level drawing&lt;/SPAN&gt;
&lt;SPAN&gt;oAsmDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Close&lt;/SPAN&gt;
&lt;SPAN&gt;'- - - - - - - - - - - - -&lt;/SPAN&gt;

&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"New Files Created in: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFolder&lt;/SPAN&gt;, &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;)
&lt;SPAN&gt;'open the folder where the new ffiles are saved&lt;/SPAN&gt;
&lt;SPAN&gt;Shell&lt;/SPAN&gt;(&lt;SPAN&gt;"explorer.exe "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFolder&lt;/SPAN&gt;, &lt;SPAN&gt;vbNormalFocus&lt;/SPAN&gt;)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 11:17:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7794602#M80757</guid>
      <dc:creator>machiel.veldkamp</dc:creator>
      <dc:date>2018-02-21T11:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7796436#M80811</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try, look at: DimensionStyle.&lt;STRONG&gt;LinearUnits&lt;/STRONG&gt;() As &lt;A href="https://forums.autodesk.com/HTML/UnitsTypeEnum.htm" target="_blank"&gt;UnitsTypeEnum&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 20:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7796436#M80811</guid>
      <dc:creator>HermJan.Otterman</dc:creator>
      <dc:date>2018-02-21T20:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7798333#M80829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/562667"&gt;@HermJan.Otterman&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried this and failed. I'm close though!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;For Each oRefDoc In oRefDocs
	'CHANGE INCHES TO MM FIRST - AFTER THAT, EXPORT
	

	
	
	dwgPathName = Left(oRefDoc.FullDocumentName, Len(oRefDoc.FullDocumentName)-3) &amp;amp; "dwg"
	'check to see that the model has a drawing of the same path and name
	If(System.IO.File.Exists(dwgPathName)) Then
				Dim oDrawDoc As DrawingDocument
				oDrawDoc = ThisApplication.Documents.Open(dwgPathName, True)
					
					
					
					
					
					Dim oStylesMgr As DrawingStylesManager = oDrawDoc.StylesManager
					MessageBox.Show(dwgPathName, "titel" )
					MessageBox.Show(oStylesMgr.ActiveStandardStyle.LinearUnits, "Title")
		                        MessageBox.Show(oStylesMgr.ActiveStandardStyle.InternalName, "titel" )
					
---&amp;gt; This is the wrong setting		oStylesMgr.ActiveStandardStyle.LinearUnits = UnitsTypeEnum.kMillimeterLengthUnits
					
					
					'MessageBox.Show(Kaas, "Title")
---&amp;gt; This is not allowed		oStylesMgr.DimensionStyles.Type = UnitsTypeEnum.kMillimeterLengthUnits&lt;BR /&gt;
				&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt;&amp;nbsp;Maybe you can figure out how&amp;nbsp;with your magic?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 08:38:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7798333#M80829</guid>
      <dc:creator>machiel.veldkamp</dc:creator>
      <dc:date>2018-02-22T08:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799132#M80842</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;Perhaps you have some pointers too?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:25:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799132#M80842</guid>
      <dc:creator>machiel.veldkamp</dc:creator>
      <dc:date>2018-02-22T11:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799304#M80847</link>
      <description>&lt;P&gt;Yes I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub ChangeDimensionStyleUnit()

'check if the active document is a drawing document
 If ThisApplication.ActiveDocumentType = kDrawingDocumentObject Then
Dim oIDW As DrawingDocument
Set oIDW = ThisApplication.ActiveDocument
 
Dim oIDWStyles As Inventor.DrawingStylesManager
Set oIDWStyles = oIDW.StylesManager

'MsgBox oIDWStyles.RevisionTableStyles.Count
'Debug.Print oIDWStyles.DimensionStyle
MsgBox oIDWStyles.DimensionStyles.Item("YOUR DIM STYLE").LinearUnits

oIDWStyles.DimensionStyles.Item("BE_DIMENSION").LinearUnits = kInchLengthUnits



 Else

 
 End If
 End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 12:45:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799304#M80847</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-02-22T12:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799315#M80848</link>
      <description>&lt;P&gt;Afterwards:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub UpdateRevisionTableStyle()

'check if the active document is a drawing document
 If ThisApplication.ActiveDocumentType = kDrawingDocumentObject Then
Dim oIDW As DrawingDocument
Set oIDW = ThisApplication.ActiveDocument
 
Dim oIDWStyles As Inventor.DrawingStylesManager
Set oIDWStyles = oIDW.StylesManager

'Debug.Print oIDWStyles.DimensionStyle
MsgBox oIDWStyles.DimensionStyles.Item("BE_DIMENSION").LinearUnits

oIDWStyles.DimensionStyles.Item("YOUR DIM STYLE").LinearUnits = kInchLengthUnits
'YOUR CODE HERE
oIDWStyles.DimensionStyles.Item("YOUR DIM STYLE").LinearUnits= kMillimeterLengthUnits 

 Else

 End If
 End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 12:49:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799315#M80848</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-02-22T12:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799396#M80851</link>
      <description>&lt;P&gt;Awesome!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I got it!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 13:14:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799396#M80851</guid>
      <dc:creator>machiel.veldkamp</dc:creator>
      <dc:date>2018-02-22T13:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799416#M80852</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Question:&lt;BR /&gt;How come that you mentioned me, i was not in this topic yet.&lt;BR /&gt;This is no problem, but i am curious only.&lt;BR /&gt;&lt;BR /&gt;Good to hear that i could have helped you.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Feb 2018 13:21:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799416#M80852</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-02-22T13:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799529#M80858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;machiel.veldkamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a bit late to this discussion, but this is what I came up with.&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"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oDrawDoc As DrawingDocument 
Dim oSheet As Sheet

'get the current drawing
oDrawDoc = ThisDoc.Document
'get the active sheet
oSheet = oDrawDoc.ActiveSheet

' Set a reference to the first general dimension in the collection.
Dim oGeneralDim As GeneralDimension
oGeneralDim = oSheet.DrawingDimensions.GeneralDimensions.Item(1)

' Set a reference to the dimension style of that dimension.
Dim oDimStyle As DimensionStyle
oDimStyle = oGeneralDim.Style

' Change units property of the dimension style to mm
' This will modify all dimensions that use this style.
oDimStyle.LinearUnits = UnitsTypeEnum.kMillimeterLengthUnits 
	
MessageBox.Show("EXPORT DXF CODE HERE", "iLogic")
	
' Change units property of the dimension style back to inches
' This will modify all dimensions that use this style.
oDimStyle.LinearUnits = UnitsTypeEnum.kInchLengthUnits 
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 13:46:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7799529#M80858</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2018-02-22T13:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Want to export DWG + PDF after converting inches to mm</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7800004#M80880</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;Well. I saw you replying to someone else in a similar topic. I thought you might be able to contribute &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Awesome sauce. Thanks again&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/562667"&gt;@HermJan.Otterman&lt;/a&gt;&amp;nbsp;for the help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still learning, getting better &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@F982DDE76110C67DBDB6AF220B48480A/emoticons/1f604.png" alt=":grinning_face_with_smiling_eyes:" title=":grinning_face_with_smiling_eyes:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 15:29:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/want-to-export-dwg-pdf-after-converting-inches-to-mm/m-p/7800004#M80880</guid>
      <dc:creator>machiel.veldkamp</dc:creator>
      <dc:date>2018-02-22T15:29:25Z</dc:date>
    </item>
  </channel>
</rss>

