<?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: Job.Info Taking a Long Time to Instantiate in Fabrication CADmep Forum</title>
    <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6902006#M2297</link>
    <description>&lt;P&gt;BTW... This next bit of information could be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;Fabrication 2016 and 2017 installed on my computer.&lt;/P&gt;&lt;P&gt;Fabrication CADmep 2016 runs on top of AutoCAD.&lt;/P&gt;&lt;P&gt;Fabrication CADmep 2017 runs on top of AutoCAD MEP.&lt;/P&gt;&lt;P&gt;The Visual Studio project has only been defined to run using the AutoCAD 2017-related DLLs using .NET framework 4.5.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The debug startup is:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Start external program&lt;/EM&gt;: &lt;STRONG&gt;C:\AutoCAD 2017\acad.exe&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Command line arguments&lt;/EM&gt;: &lt;STRONG&gt;/ld "C:\Program Files\Autodesk\Fabrication 2017\CADmep\CADmep21_x64.arx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2017 18:13:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-24T18:13:24Z</dc:date>
    <item>
      <title>Job.Info Taking a Long Time to Instantiate</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6901772#M2296</link>
      <description>&lt;PRE&gt;The first time that the Job.Info object is accessed it takes 20 seconds to continue to the next line.&lt;BR /&gt;&lt;BR /&gt;oDR.InfoCreationDate = &lt;STRONG&gt;Job.Info.CreationDate&lt;/STRONG&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Command.cs...

namespace McKenneys
{
    public class DuctDataExport : IExtensionApplication
    {
        public void Initialize()
        {
            //string sFile = @"Autodesk\Fabrication 2017\CADmep\FabricationAPI.dll";
            //string sPF = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), sFile);
            //Assembly MyDALL = Assembly.LoadFrom(sPF);
            //Type MyLoadClass = MyDALL.GetType("Autodesk.Fabrication.Job"); // name of your class
            //Activator.CreateInstance(MyLoadClass);
        }

        [CommandMethod("FabAPIDuctDataExport", "FabAPIDuctDataExport", CommandFlags.Modal)]
        public void Execute()
        {
            try
            {
                string sFile = @"Autodesk\Fabrication 2017\CADmep\FabricationAPI.dll";
                string sPF = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), sFile);
                Assembly MyDALL = Assembly.LoadFrom(sPF);
                Type MyLoadClass = MyDALL.GetType("Autodesk.Fabrication.Job");
                Activator.CreateInstance(MyLoadClass);

                ClassStatic.SetApplicationProperties();
                ClassStatic.PopulateDataTables();
                new ClassFabrication();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

        }

        public void Terminate()
        {
        }

    }

}

// ClassFabrication.cs...

namespace McKenneys.Classes
{
    public class ClassFabrication
    {
        // Constructor...

        public ClassFabrication()
        {
            ...
            Data1UpdateProject();
            ...
        }

        private void Data1UpdateProject()
        {
            // Create new strongly-typed DataRow object.
            var oDR = ClassStatic.ProjectJobInformationDT.NewProjectJobInformationRow();

            oDR.ProjectId = _ProjectId;
            oDR.InfoCreationDate = &lt;STRONG&gt;Job.Info.CreationDate&lt;/STRONG&gt;;
            oDR.InfoDescription = Job.Info.Description;
            ...
         }

    }

}

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see I've tried Assembly.Load from two different methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What&amp;nbsp;do I need to do to resolve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 16:51:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6901772#M2296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-24T16:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Job.Info Taking a Long Time to Instantiate</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6902006#M2297</link>
      <description>&lt;P&gt;BTW... This next bit of information could be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;Fabrication 2016 and 2017 installed on my computer.&lt;/P&gt;&lt;P&gt;Fabrication CADmep 2016 runs on top of AutoCAD.&lt;/P&gt;&lt;P&gt;Fabrication CADmep 2017 runs on top of AutoCAD MEP.&lt;/P&gt;&lt;P&gt;The Visual Studio project has only been defined to run using the AutoCAD 2017-related DLLs using .NET framework 4.5.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The debug startup is:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Start external program&lt;/EM&gt;: &lt;STRONG&gt;C:\AutoCAD 2017\acad.exe&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Command line arguments&lt;/EM&gt;: &lt;STRONG&gt;/ld "C:\Program Files\Autodesk\Fabrication 2017\CADmep\CADmep21_x64.arx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 18:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6902006#M2297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-24T18:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Job.Info Taking a Long Time to Instantiate</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6938252#M2329</link>
      <description>&lt;P&gt;Solved my own problem.&lt;/P&gt;&lt;P&gt;The time it takes to "instantiate" the Job object is directly proportional to how many entities are in the file.&lt;/P&gt;&lt;P&gt;The more entities, the longer it takes.&lt;/P&gt;&lt;P&gt;I had over 3000 objects in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 19:54:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6938252#M2329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-10T19:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Job.Info Taking a Long Time to Instantiate</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6962106#M2348</link>
      <description>&lt;P&gt;The solution (from Andy Robins)...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you load CADmep or a DWG that contains CADmep objects, the application is basically in “viewer” mode UNTIL you use any command, then it checks the license out.&amp;nbsp;I suspect if you double click on an object in the model or take a new object off, you will experience the same delay, then it will be fine and so will the API (as its licensed now).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 17:24:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/job-info-taking-a-long-time-to-instantiate/m-p/6962106#M2348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-21T17:24:27Z</dc:date>
    </item>
  </channel>
</rss>

