<?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: Open PDF in command in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152266#M6491</link>
    <description>&lt;P&gt;Hi thanks for your response. I'm not sure what you mean. I know there is a command -PDFIMPORT but there is a dialog box which prevents SendACommandToAutoCAD from working. This code can also be found on website but PDFIMPORT command isn't working for me in this setting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. I am using Visual Studio 2013 and AutoCAD 2017&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 17:03:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-24T17:03:29Z</dc:date>
    <item>
      <title>Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152002#M6489</link>
      <description>&lt;P&gt;Hi, I'm trying to figure out a way to open a pdf using the command line. AutoCAD has code for how to open a DWG but this does not work for a pdf.&amp;nbsp;Below is&amp;nbsp;AutoCAD's "Open an existing drawing command". How do you modify this for PDF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; System.IO;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.AutoCAD.ApplicationServices;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.AutoCAD.DatabaseServices;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.AutoCAD.Runtime;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;[&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"OpenDrawing"&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;CommandFlags&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Session)]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;public&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;static&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;void&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; OpenDrawing()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;string&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; strFileName = &lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"C:\\campus.dwg"&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DocumentCollection acDocMgr = Application.DocumentManager;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (File.Exists(strFileName))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;acDocMgr.Open(strFileName, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acDocMgr.MdiActiveDocument.Editor.WriteMessage(&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"File "&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; + strFileName + &lt;FONT color="#a31515" face="Consolas" size="2"&gt;" does not exist."&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:27:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152002#M6489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T15:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152189#M6490</link>
      <description>&lt;P&gt;If you want to open PDF document/file in the similar way as AutoCAD API does, you need to use an application, which provides similar API method and can be automated from AutoCAD (since you want to open it from AutoCAD). So, is there such an application? Probably. However, in your case, it can be done in a lot easier way: simply use System.Diagnostics.Process.Start() with either pfd file name or a ProcessStartInfo argument supplied to start a default PDF application in the computer, as long as the computer has a PDF application installed, most likely, Adobe PDF Reader.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 16:33:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152189#M6490</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-24T16:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152266#M6491</link>
      <description>&lt;P&gt;Hi thanks for your response. I'm not sure what you mean. I know there is a command -PDFIMPORT but there is a dialog box which prevents SendACommandToAutoCAD from working. This code can also be found on website but PDFIMPORT command isn't working for me in this setting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. I am using Visual Studio 2013 and AutoCAD 2017&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:03:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152266#M6491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T17:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152286#M6492</link>
      <description>&lt;P&gt;Well, what you asked is "a way to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;open a pdf&lt;/STRONG&gt;&lt;/FONT&gt;...".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you are saying it is "PDFIMPORT" command, which is importing data into AutoCAD as AutoCAD entity, as your previous post asked.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:14:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152286#M6492</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-24T17:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152293#M6493</link>
      <description>&lt;P&gt;I meant opening it as a drawing. Otherwise, like you said Adobe works great for just opening a PDF. Do you know if its possible to do what&amp;nbsp;I want?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:18:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152293#M6493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T17:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152321#M6494</link>
      <description>&lt;P&gt;Or do you suggest any other way to do it?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:30:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152321#M6494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T17:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152332#M6495</link>
      <description>&lt;P&gt;Regarding to your previous post, want to run command "PDFIMPORT", but have difficult to bypass the open file dialog box (which is NOT OPENING PDF itself, it only service the purpose to get a valid file name). If your current question is still on that topic, here is what you can try in code: set system variable "FILEDIA" to 0 prior to send command "PDFIMPORT"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Application.SetSystemVariable("FILEDIA", 0);&lt;/P&gt;
&lt;P&gt;command="-PDFIMPORT f '" + userFile + "' 1 ......"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to set "FILEDIA" back after the command completed (in CommandEnded event handler, maybe?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152332#M6495</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-24T17:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152367#M6496</link>
      <description>&lt;P&gt;Hi, Thank you again. This got me passed the dialog, but the weird thing is the command took the whole string at once and did not take the rest of the parameters for the whole string. Basically, the initial command was ._-PDFIMPORT f userfile .... then it asked for me to enter the file manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also what is the default value for FILEDIA?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:50:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8152367#M6496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T17:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154303#M6497</link>
      <description>&lt;P&gt;Anyone know how to solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the default value for FILEDIA I put it in wrong place in program so it wasn't working as expected but that is fixed.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 13:10:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154303#M6497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T13:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154801#M6498</link>
      <description>&lt;P&gt;Well, after figuring out what system variable "FILEDIA" means, it is just a matter of try-error-try needed to figure out how to feed all the inputs required at command line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you are using Acad2017 (Acad2015 or later), executing Acad command with Editor.Command() method would be much easier than Document.SendStringToExecute() in this case (a command with many user inputs).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the Editor.Command() version of code, which works with my Acad2018:&lt;/P&gt;
&lt;PRE&gt;        [CommandMethod("PdfIn")]
        public static void ImportPdf()
        {
            var dwg = CadApp.DocumentManager.MdiActiveDocument;
            var ed = dwg.Editor;
            try&lt;BR /&gt;            {&lt;BR /&gt;                //Save original FILEDIA value and then set it to 0
                int fileDia = Convert.ToInt32(CadApp.GetSystemVariable("FILEDIA"));
                CadApp.SetSystemVariable("FILEDIA", 0);
                ed.Command("-PDFIMPORT", "f", "D:/Temp/TestPdf.pdf", 1, "10.0,10.0", 1.0, 0.0);
            }
            catch(System.Exception ex)
            {
                CadApp.ShowAlertDialog(ex.Message);
            }
            finally
            {&lt;BR /&gt;                //Restore changed FILEDIA value back to original
                CadApp.SetSystemVariable("FILEDIA", fileDia);
            }
        }&lt;/PRE&gt;
&lt;P&gt;However, Editor.Command() can only be called in Document Context. If you want to do it in Application context (such as doing it from button click of a modeless window, you cannot call Editor.Command(), so, a Document.SendStringToExecution(0 version would still needed as below, which also works OK with my Acad2018:&lt;/P&gt;
&lt;PRE&gt;        [CommandMethod("PdfIn", CommandFlags.Session)]
        public static void ImportPdf()
        {
            var dwg = CadApp.DocumentManager.MdiActiveDocument;
            var ed = dwg.Editor;
            //Save origial FILEDIA value
            int fileDia = Convert.ToInt32(CadApp.GetSystemVariable("FILEDIA"));&lt;BR /&gt;            //Set FILEDIA value to 0
            dwg.SendStringToExecute("(setvar \"FILEDIA\" 0)\r", true, false, false);&lt;BR /&gt;            //Start command -PDFIMPORT with pdf file name supplied
            var cmd = "-PDFIMPORT f \"D:\\Temp\\TestPdf.pdf\"\r";
            dwg.SendStringToExecute(cmd, true, false, false);&lt;BR /&gt;            // supply page input
            dwg.SendStringToExecute("1\r", true, false, false);&lt;BR /&gt;            // supply insertion location input
            dwg.SendStringToExecute("10.0,10.0\r", true, false, false);&lt;BR /&gt;            // supply scale input
            dwg.SendStringToExecute("1.0\r", true, false, false);&lt;BR /&gt;            // supply rotation input
            dwg.SendStringToExecute("30.0\r", true, false, false);&lt;BR /&gt;            // restore FILEDIA back to original
            dwg.SendStringToExecute($"(setvar \"FILEDIA\" {fileDia})\r", true, false, false);
        }&lt;/PRE&gt;
&lt;P&gt;Notice that I added CommandFlags.Session to make this command being executed in Application context, thus I must use Document.SendStringToExecution(), rather than Editor.Command().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, this forum is meant for AutoCAD VBA/COM API, while your post is about AutoCAD .NET API, which should be posted in .NET forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:20:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154801#M6498</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-25T15:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154869#M6499</link>
      <description>&lt;P&gt;CadApp.SetSystemVariable("FILEDIA", fileDia);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this line, I'm getting an error "The name 'fileDia' does not exist in the current context even though it is declared and spelled the same in the try{}.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I tried just putting the dialog to 1 instead of fileDia and ran the command. I tried the Editor.Command() version and it did not import the PDF I entered. I changed the filepath appropriately. What do you mean by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not know there were different forums, sorry.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:50:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154869#M6499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154991#M6500</link>
      <description>&lt;P&gt;Ah, this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int fileDia = Convert.ToInt32(CadApp.GetSystemVariable("FILEDIA"));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;should be move before&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;catch{}&lt;/P&gt;
&lt;P&gt;finally{}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached&amp;nbsp;video clip below shows how the code being executed line by line in debugging mode and the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="iframe-container"&gt;&lt;IFRAME width="640" height="590" src="https://screencast.autodesk.com/Embed/Timeline/7bcefadd-6bd1-4c07-94a2-71c03e71d8db" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 16:17:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8154991#M6500</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-25T16:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8155138#M6501</link>
      <description>&lt;P&gt;When I run this code, then do Netload as usual,&amp;nbsp;the PDFIN command doesn't show up in AutoCAD for some reason.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/527156i378E4E8AF7A2AC53/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 17:22:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8155138#M6501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T17:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8155550#M6502</link>
      <description>&lt;P&gt;How does the second way work for you? For me this line gives me 14 errors:&lt;/P&gt;&lt;P&gt;dwg.SendStringToExecute($"(setvar \"FILEDIA\" {fileDia})\r", true, false, false);&lt;/P&gt;&lt;P&gt;I found away around the "command not showing up" in my previous reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to try the second way. I'm assuming its a really small thing that's giving so many errors. Is there a reference or another library I need to include?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/527231iD7D0BCECD8E33148/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/527232i6C178E8B2725A4B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 19:49:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8155550#M6502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-25T19:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8157295#M6503</link>
      <description>&lt;P&gt;Code like&lt;/P&gt;
&lt;P&gt;var stringValue = $"xxxxx{varName}xxxx";&lt;/P&gt;
&lt;P&gt;is C# 6.0 feature (.NET 4.6 or later)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously, you are targeting .NET4.5. SO, simply change that line to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dwg.SendStringToExecute("(setvar \"FILEDIA\" " + fileDia.ToString() + ")\r", true, false, false)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:06:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/8157295#M6503</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-07-26T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Open PDF in command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/9705167#M6504</link>
      <description>&lt;P&gt;Hi yall,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was probably solved. Saw that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp; had some good insight on tackling this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attaching a Code I developed along with a custom FileDialog Class in order to select the pdf of interest via a file dialog.&lt;/P&gt;&lt;P&gt;I'll have to credit &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;for posting the custom FileDialog Class workaround here:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/vba/vba-open-file-with-dialog-box/td-p/1726554" target="_blank" rel="noopener"&gt;VBA Custom FileDialog Class Workaround&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code lets you select the multipage pdf, input the first # of sheets to pdf import ,starting from sheet1, into the active modelspace, input the scale, and wallah! There's a "ReadMe.txt" file for instructions.&lt;/P&gt;&lt;P&gt;The imports will be neatly organized systemically with a nominal degree of seperation (see my screenshot).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*What if you have multiple single sheet pdfs?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Assuming they are all single sheets, for the Input prompt "first # of sheets" will have to be set to 1 since you're just importing the first sheet on this pdf&lt;/LI&gt;&lt;LI&gt;Update the following FileDialog object In my main "ACAD_PDF" code at this line and set to True: &lt;STRONG&gt;objFile.MultiSelect = True&amp;nbsp;&lt;/STRONG&gt;'Select one file (False) vs multi files (True)&lt;/LI&gt;&lt;LI&gt;The following variable will absorb each file name in one long single string, separated by blanks:&amp;nbsp;strFileName&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;You will have to parse the string. I'd recommend allocating the strings into a collection or array that you can then loop through around the "Loop Through PDF" section of the "ACAD_PDF" code.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Enjoy!&lt;/P&gt;&lt;P&gt;OJ3D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:47:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-pdf-in-command/m-p/9705167#M6504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T18:47:13Z</dc:date>
    </item>
  </channel>
</rss>

