<?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 Code Attached in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11263#M45</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attaching the code I have so far.&amp;nbsp; I am just looking to get it working with the hardcoded values, because then I will loop through the individual records I need to import through a dataset.&amp;nbsp; Any help on this is greatly appreciated, and I'm sorry for if the help is something I should have seen myself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Apr 2010 20:22:24 GMT</pubDate>
    <dc:creator>JoshHandler</dc:creator>
    <dc:date>2010-04-19T20:22:24Z</dc:date>
    <item>
      <title>Import - Current Project</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11262#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have a quick sample for inserting an order into the current projects Orders Inbox.&amp;nbsp; I have searched and can't find anything.&amp;nbsp; I have successfully gotten this to work from external application (ExternalAddData), but am having a hard time following how to code for current project through a plug-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Josh H&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 17:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11262#M44</guid>
      <dc:creator>JoshHandler</dc:creator>
      <dc:date>2010-04-19T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Code Attached</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11263#M45</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attaching the code I have so far.&amp;nbsp; I am just looking to get it working with the hardcoded values, because then I will loop through the individual records I need to import through a dataset.&amp;nbsp; Any help on this is greatly appreciated, and I'm sorry for if the help is something I should have seen myself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 20:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11263#M45</guid>
      <dc:creator>JoshHandler</dc:creator>
      <dc:date>2010-04-19T20:22:24Z</dc:date>
    </item>
    <item>
      <title>Import - Current Project</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11264#M46</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Josh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample project attached that adds an order to Order Inbox based on what you had started.&amp;nbsp; Probably the main thing you were missing was bracketing the edit in BeginModification/FinishModification calls.&amp;nbsp; The geocoder needed to be initialized as well.&amp;nbsp;&amp;nbsp; I also added Try/Catch around the edits and validating the order which are generally good things to do for editing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If at all possible with your work flow, it will be easier for you if you can have the user create the new routing folder in ArcLogistics.&amp;nbsp; This will take care of copying all of the Vehicle templates to Routes which is non-trivial (we should really have a helper method for this).&amp;nbsp; Then enable your Plug-In when a Routing Folder is selected and do your import into the selected routing folder.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also changed OnDestroy() since we have evolved how we do that a bit.&amp;nbsp; It is better to not call WaitForPendingFinalizers() since that will hang when you have more than one Plug-In within the same project (they will all be waiting for each other).&amp;nbsp; We also call Marshall.ReleaseComObject(m_app).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let us know if this is enough to get you going or feel free to ask more questions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 19:13:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11264#M46</guid>
      <dc:creator>JeffWickstrom</dc:creator>
      <dc:date>2010-04-21T19:13:00Z</dc:date>
    </item>
    <item>
      <title>THANK YOU!!!</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11265#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; First off, I want to say THANK YOU THANK YOU&amp;nbsp; VERY MUCH.&amp;nbsp; I have already used the sample you gave me and added a dialog that I will need and it worked flawless.&amp;nbsp; I was briefly looking through the code, and didn't see anywhere that you specified the orders inbox.&amp;nbsp; I am assuming that if a routing folder is not specified, then the order is added just to the inbox itself?&amp;nbsp; We are constantly moving orders in and out between folders, so I think the way it is setup right now will work perfect for our workflow, but I may need to do the routing folder direct insert in the future.&amp;nbsp; I also have another question in regards to the amount of adds/edits/deletes that we do on a daily basis.&amp;nbsp; This is in regards to the gdb size itself.&amp;nbsp; Can I ask you that question in this thread, or should I create a new thread for that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for all your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 20:55:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11265#M47</guid>
      <dc:creator>JoshHandler</dc:creator>
      <dc:date>2010-04-21T20:55:04Z</dc:date>
    </item>
    <item>
      <title>Import - Current Project</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11266#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Josh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you get the Orders collection from the Project, these are the Order Inbox orders.&amp;nbsp; If you were to get the UnassignedOrders from the Routing Folder, these would be in that collection.&amp;nbsp; Or you can get the Orders for a Route.&amp;nbsp; At least I think that is how it works.&amp;nbsp; Going the other direction, given any particular order, you could get its Parent property and check whether or not it is an IALProject, an IALRoutingFolder or an IALRoute.&amp;nbsp; I think it is the "Is" operator in vb.net you use to do this "Query Interface" as we would call it in the old COM ways.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lets us know if you get stuck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding amount of edits, I don't think there is a hard limit.&amp;nbsp; Generally the database size is unlimited.&amp;nbsp; It would be a good idea to click the save button before there are too many just in case something bad happens so you don't lose work.&amp;nbsp; Also it is a good idea to make new projects once in a while and use prior projects as templates as a way to backup and/or "compact" the project databases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Apr 2010 21:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11266#M48</guid>
      <dc:creator>JeffWickstrom</dc:creator>
      <dc:date>2010-04-22T21:31:47Z</dc:date>
    </item>
    <item>
      <title>Import - Current Project</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11267#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Thanks as always for the direction.&amp;nbsp; I wish I knew more about the ins and outs of COM, would probably be a huge help for me.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In regards to the database, what we are trying to do is automate the process of either compacting the database, or as you referenced, copying the database.&amp;nbsp; It looks like there are methods available to compact the database (IDatabaseCompact) that I am actually trying to create an app right now to utilize.&amp;nbsp; Is it possible to create a new database via copy without using the app, but more through a custom program?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Apr 2010 12:25:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11267#M49</guid>
      <dc:creator>JoshHandler</dc:creator>
      <dc:date>2010-04-23T12:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import - Current Project</title>
      <link>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11268#M50</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Josh, did you ever get IDatabaseCompact to work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I seem to be running into a basic flaw (either with the object or my understanding of it - more likely).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Example for IDatabaseCompact shows the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Set pWorkspaceFactory = New AccessWorkspaceFactory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set pWorkspace = pWorkspaceFactory.OpenFromFile("C:\arcgis\ArcTutor\BuildingaGeodatabase\Montgomery.mdb", 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim pDatabaseCompact As IDatabaseCompact&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If TypeOf pWorkspace Is IDatabaseCompact Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pDatabaseCompact = pWorkspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If pDatabaseCompact.CanCompact Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pDatabaseCompact.Compact&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it dies on Compact as the database is open and has a lock on it.&amp;nbsp; I'm told to try again when the DB is available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do you get around this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jun 2010 16:19:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/import-current-project/m-p/11268#M50</guid>
      <dc:creator>DanielShaffer</dc:creator>
      <dc:date>2010-06-11T16:19:02Z</dc:date>
    </item>
  </channel>
</rss>

