<?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: Converting STEP files to DWG pogramatically (C#) in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825853#M311077</link>
    <description>&lt;P&gt;Thanks for your answers, i didn't know about mechanical, but i don't have it and it works (as a user).&lt;/P&gt;&lt;P&gt;I don't have access to the "stepin" command"n what does it do? Is it only in mechanical?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2015 15:07:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-21T15:07:22Z</dc:date>
    <item>
      <title>Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825738#M311074</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to import a STEP (.stp) into AutoCAD 2016 and save it as DWG, which works as a user.&lt;/P&gt;&lt;P&gt;The main problem is about emulating the "import" command.&lt;/P&gt;&lt;P&gt;I didn't find any way to import in managed code, so I tried interop:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;using Autodesk.AutoCAD.EditorInput;&lt;BR /&gt;using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;using Autodesk.AutoCAD.Windows;&lt;BR /&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Drawing;&lt;BR /&gt;using System.IO;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows.Forms;&lt;BR /&gt;using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;using Autodesk.AutoCAD.Interop;&lt;BR /&gt;using AcadInterop = Autodesk.AutoCAD.Interop.AcadApplication;&lt;BR /&gt;using System.Runtime.InteropServices;&lt;BR /&gt;using Autodesk.AutoCAD.Geometry;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[CommandMethod("steptodwg", (CommandFlags.Modal | CommandFlags.Session))]&lt;BR /&gt;public void Convert()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;Document doc = AcadApp.DocumentManager.MdiActiveDocument;&lt;/P&gt;&lt;P&gt;AcadDocument comDoc = (Autodesk.AutoCAD.Interop.AcadDocument)doc.GetAcadDocument();&lt;/P&gt;&lt;P&gt;double myScale = 1;&lt;/P&gt;&lt;P&gt;double[] ptArray = { 1, 1, 0 };&lt;/P&gt;&lt;P&gt;comDoc.Import(@"C:\test.stp", (object)ptArray, myScale);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The message is "Invalid argument".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose the argument causing problems is the point of insertion, but I can't say for sure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 14:08:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825738#M311074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T14:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825831#M311075</link>
      <description>sorry I cannot assist with the code, just providing the simple fact that AutoCAD by itself cannot work with step files.  If you want to work with step files in Acad, you will also need to have AutoCAD Mechanical installed.  Perhaps the code you're working on will need to be modified to work in conjunction with Acad Mech.  HTH</description>
      <pubDate>Mon, 21 Sep 2015 14:56:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825831#M311075</guid>
      <dc:creator>ampster40</dc:creator>
      <dc:date>2015-09-21T14:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825834#M311076</link>
      <description>also, instead of working with the "import" command, try utilizing the "stepin" command.</description>
      <pubDate>Mon, 21 Sep 2015 14:57:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825834#M311076</guid>
      <dc:creator>ampster40</dc:creator>
      <dc:date>2015-09-21T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825853#M311077</link>
      <description>&lt;P&gt;Thanks for your answers, i didn't know about mechanical, but i don't have it and it works (as a user).&lt;/P&gt;&lt;P&gt;I don't have access to the "stepin" command"n what does it do? Is it only in mechanical?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:07:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825853#M311077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T15:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825860#M311078</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/89865"&gt;@ampster40&lt;/a&gt; wrote:&lt;BR /&gt;....&amp;nbsp;the simple fact that AutoCAD by itself cannot work with step files. If you want to work with step files in Acad, you will also need to have AutoCAD Mechanical installed.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Incorrect information.&amp;nbsp;&lt;BR /&gt;Vanilla AutoCAD has been able to import STEP files for at least a couple of releases now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="AutoCAD Imports File Types.png" alt="AutoCAD Imports File Types.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/189840iFA362ACEED9A54AC/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:19:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825860#M311078</guid>
      <dc:creator>JDMather</dc:creator>
      <dc:date>2015-09-21T15:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825871#M311079</link>
      <description>&lt;P&gt;Can it be done? Read this from Autodesk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-81A5EE76-39A7-40A4-A5C5-E4921C03B33A-htm.html" target="_blank"&gt;http://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-81A5EE76-39A7-40A4-A5C5-E4921C03B33A-htm.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at where it said STEP.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:16:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825871#M311079</guid>
      <dc:creator>Patchy</dc:creator>
      <dc:date>2015-09-21T15:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825890#M311080</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/89865"&gt;@ampster40&lt;/a&gt; wrote:&lt;BR /&gt;sorry I cannot assist with the code, just providing the simple fact that &lt;STRONG&gt;AutoCAD by itself cannot work with step files.&lt;/STRONG&gt; If you want to work with step files inAcad, you will also need to have AutoCAD Mechanical installed. Perhaps the code you're working on will need to be modified to work in conjunction withAcadMech.HTH&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is so wrong.....You can import step files with vanilla&amp;nbsp;AutoCAD.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:21:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825890#M311080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T15:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825902#M311081</link>
      <description>Tks JD, you are correct.  It only handles 1/2 of the step file situation.  It cannot export but it can import.  Sorry for the bad info.</description>
      <pubDate>Mon, 21 Sep 2015 15:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825902#M311081</guid>
      <dc:creator>ampster40</dc:creator>
      <dc:date>2015-09-21T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825925#M311082</link>
      <description>&lt;P&gt;As I said in the 1st post, I could do it as a user, so that's not the problem at all.&lt;/P&gt;&lt;P&gt;No offense, but I'm looking for developper's advices here.&lt;/P&gt;&lt;P&gt;Thanks for your answers anyway.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:28:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825925#M311082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T15:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825936#M311083</link>
      <description>&lt;P&gt;Then you need to go to proper group, not autocad users group.&lt;/P&gt;
&lt;P&gt;Dig in here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/custom/page/page-id/Discussions-Page" target="_blank"&gt;http://forums.autodesk.com/t5/custom/page/page-id/Discussions-Page&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825936#M311083</guid>
      <dc:creator>Patchy</dc:creator>
      <dc:date>2015-09-21T15:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Converting STEP files to DWG pogramatically (C#)</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825937#M311084</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;As I said in the 1st post, I could do it as a user, so that's not the problem at all.&lt;/P&gt;&lt;P&gt;No offense, but I'm looking for developper's advices here.&lt;/P&gt;&lt;P&gt;Thanks for your answers anyway.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Maybe look in the proper forum....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1" target="_blank"&gt;http://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 15:31:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/converting-step-files-to-dwg-pogramatically-c/m-p/5825937#M311084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T15:31:41Z</dc:date>
    </item>
  </channel>
</rss>

