<?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 VBA Question in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8235969#M88325</link>
    <description>&lt;P&gt;Not sure if this post should be asked here or the Vault forum. Here goes anyways, I'm sure someone will enlighten me. &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7B4B80143EBEB4F250CEEC82342F6CA1/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use Inventor VBA to check the status of a ".idw" file to see if it is checkout out or not. If it is not checked out, I would like to know how to check it out using VBA and it's child model file as well, so I can change some iProperties&amp;nbsp;then check them back in. The screenshot image below is an example of the two files that need to be checked out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&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-left" image-alt="vaultaddinbrowserss.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/540845iC3CD4C7E7ECE38EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaultaddinbrowserss.PNG" alt="vaultaddinbrowserss.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The "CNB-64-3B.idw" file has two child ".ipt" documents referenced. The "CNB-64-3B.ipt" model file is the file which contains the iProperties&amp;nbsp;that populate the titleblock&amp;nbsp;on the sheets in the &lt;SPAN&gt;"CNB-64-3B.idw" file. So We have to check the status of each one of these. If the status is not checked out then we need to check out the files do our changes then check them all back in. The iProperty fields in the&amp;nbsp;"CNB-64-3B.ipt" model file that we need to change is just approval by and approval date iProperty fields.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The reason I'm asking this on the forum is that my google searches and forum searches have left me with very little result. Any help on this subject would be greatly appreciated. Also if this needs to be moved to a different forum please let me know so I can deal with that. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 16:49:11 GMT</pubDate>
    <dc:creator>sgwilliams</dc:creator>
    <dc:date>2018-08-30T16:49:11Z</dc:date>
    <item>
      <title>VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8235969#M88325</link>
      <description>&lt;P&gt;Not sure if this post should be asked here or the Vault forum. Here goes anyways, I'm sure someone will enlighten me. &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7B4B80143EBEB4F250CEEC82342F6CA1/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use Inventor VBA to check the status of a ".idw" file to see if it is checkout out or not. If it is not checked out, I would like to know how to check it out using VBA and it's child model file as well, so I can change some iProperties&amp;nbsp;then check them back in. The screenshot image below is an example of the two files that need to be checked out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&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-left" image-alt="vaultaddinbrowserss.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/540845iC3CD4C7E7ECE38EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaultaddinbrowserss.PNG" alt="vaultaddinbrowserss.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The "CNB-64-3B.idw" file has two child ".ipt" documents referenced. The "CNB-64-3B.ipt" model file is the file which contains the iProperties&amp;nbsp;that populate the titleblock&amp;nbsp;on the sheets in the &lt;SPAN&gt;"CNB-64-3B.idw" file. So We have to check the status of each one of these. If the status is not checked out then we need to check out the files do our changes then check them all back in. The iProperty fields in the&amp;nbsp;"CNB-64-3B.ipt" model file that we need to change is just approval by and approval date iProperty fields.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The reason I'm asking this on the forum is that my google searches and forum searches have left me with very little result. Any help on this subject would be greatly appreciated. Also if this needs to be moved to a different forum please let me know so I can deal with that. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 16:49:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8235969#M88325</guid>
      <dc:creator>sgwilliams</dc:creator>
      <dc:date>2018-08-30T16:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8237912#M88349</link>
      <description>&lt;P&gt;This link suggests checking the files readonly status to see if file is checked out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/vba-see-if-part-is-checked-out-from-vault/m-p/7162540" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/vba-see-if-part-is-checked-out-from-vault/m-p/7162540&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best I have to do the checking in and out is to use the command manager&lt;/P&gt;&lt;PRE&gt;Sub CheckInGUI()

Dim app As Application
Dim ctrdef As ControlDefinition
Set app = ThisApplication
'For Each cd In App.CommandManager.ControlDefinitions
'    If cd.InternalName Like "*Vault*" Then
'        Debug.Print (cd.InternalName)
'    End If
'Next
Set ctrdef = app.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
ctrdef.Execute
End Sub&lt;/PRE&gt;&lt;P&gt;run the commented section to get a list of the other functions you can run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have vault pro you can automate checkin and checkout but you'd have to make an addin I believe. If your interested I could try to did up the code I started working on to do that but then found out the class I needed was only availible to vault pro which we didn't have.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 13:15:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8237912#M88349</guid>
      <dc:creator>clutsa</dc:creator>
      <dc:date>2018-08-31T13:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8238303#M88356</link>
      <description>Appreciate the time you took to reply, but I'm already aware of all this. We tried this two days ago and got no where. We actually started coding an add-in for Inventor shortly after two days ago. I guess we will have to continue on that path as it seems like the only solution so far. We posted this question to test the waters to see if someone had an easier fix. The plugin will be alot of time that we had not accounted for on this project. Oh well life goes on&lt;BR /&gt;&lt;BR /&gt;Thanks fof your time. If I dont get a better answer, you will be the champion come Monday 5pm. Thanks again and enjoy the holiday weekend.&lt;BR /&gt;</description>
      <pubDate>Fri, 31 Aug 2018 15:22:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8238303#M88356</guid>
      <dc:creator>sgwilliams</dc:creator>
      <dc:date>2018-08-31T15:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8241489#M88382</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/281295"&gt;@sgwilliams&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vault file may not be&amp;nbsp;accessible&amp;nbsp;through Inventor VBA. Already, there are couple of forum posts on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/vault-access-through-inventor/m-p/5560858/highlight/true#M54959" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/vault-access-through-inventor/m-p/5560858/highlight/true#M54959&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/check-vault-status-via-vba/m-p/2795396/highlight/true#M33348" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/check-vault-status-via-vba/m-p/2795396/highlight/true#M33348&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 10:45:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8241489#M88382</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-09-03T10:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8242283#M88384</link>
      <description>&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/file-is-a-new-file-not-known-to-vault/m-p/7864197#M82120" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/file-is-a-new-file-not-known-to-vault/m-p/7864197#M82120&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 19:34:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8242283#M88384</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2018-09-03T19:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246194#M88420</link>
      <description>&lt;P&gt;It's very disappointing to have an API for Inventor and Vault and not be able to accomplish a simple task like checking a file status. I get that there is a lot&amp;nbsp;of background things that happen when a file is checked in or out that we are not privy too, hence proprietary&amp;nbsp;software. Autodesk has every right to limit what we can and cannot accomplish. When we purchase the license to use thier&amp;nbsp;software we also agree to there terms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would think though as&amp;nbsp;a company as forward-thinking as&amp;nbsp;Autodesk is that they could at least let us check the status of a file. Very, Very, Very disappointing. Did I mention We are disappointed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have an issue with using the Inventor Vault check-in&amp;nbsp;or check out dialogs as&amp;nbsp;long as I can integrate that into a VBA script as part of the workflow. I don't care that I cannot programmatically&amp;nbsp;check a file in or out. I basically just need to check the file status so I can decide what to do next. Doesn't get any simpler than that. The automating of a simple task is what efficiency thrives on. I understand that Autodesk cannot make everyone happy and only a fool would think this. Not sure if my question was answered&amp;nbsp;or not I have to sit on this for a while and ponder a decision...sorry to make you wait.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:49:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246194#M88420</guid>
      <dc:creator>sgwilliams</dc:creator>
      <dc:date>2018-09-05T10:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246415#M88422</link>
      <description>&lt;P&gt;It's one of the disappointing things that should be fixed in the future.&amp;nbsp; Standard Add-Ins and Environments that come with Inventor do not have an SDK or exposed API that can be easily used in iLogic.&amp;nbsp; The only real solution to Vault check-in/out status is an external program using Vault Workgroup/Professional API.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:18:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246415#M88422</guid>
      <dc:creator>philip1009</dc:creator>
      <dc:date>2018-09-05T12:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246426#M88423</link>
      <description>So your saying if we have Vault Professional (which we do) then we can programmatically use the Vault API to get this information by creating an add-in in Say Visual Studio 2017? If this is the case then that's what we will do. Are you saying this is possible then with Vault Professional 2018 API?&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:22:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246426#M88423</guid>
      <dc:creator>sgwilliams</dc:creator>
      <dc:date>2018-09-05T12:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246455#M88425</link>
      <description>&lt;P&gt;Yes, I've never used it myself, but that's my understanding.&amp;nbsp; I may be wrong here, but it requires a license in Visual Studio, the free version doesn't have this capability, good luck and let us know of your successes as it will answer a lot of questions.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:29:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246455#M88425</guid>
      <dc:creator>philip1009</dc:creator>
      <dc:date>2018-09-05T12:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246484#M88426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is sufficient way to accomplish it thru VBA... after determine status of file you can use .execute to checkin the files... if you want to do it without user interaction switch off check_in dialog window in inventor vault options..:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If ThisApplication.CommandManager.ControlDefinitions.Item("VaultDataCardtop").Enabled = True And&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckouttop").Enabled = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print "in vault(not checked out) check out possible"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If ThisApplication.CommandManager.ControlDefinitions.Item("VaultDataCardtop").Enabled = True And&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ThisApplication.CommandManager.ControlDefinitions.Item("VaultUndoCheckouttop").Enabled = True Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print "in vault checked out"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If ThisApplication.CommandManager.ControlDefinitions.Item("VaultDataCardtop").Enabled = True And&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckouttop").Enabled = False And&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckintop").Enabled = False Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print "in vault locked (not possible to check out)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If ThisApplication.CommandManager.ControlDefinitions.Item("VaultDataCardtop").Enabled = False Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print "not in vault"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End If,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:37:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8246484#M88426</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2018-09-05T12:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8250651#M88482</link>
      <description>&lt;P&gt;Actually the only difference in VS2017 Community and Professional is money. Microsoft changed it's licensing for VS software. The Community is almost Identical in functionality as Professional. I have yet to see a limitation that we would use. I think the only tool you get with Professional vs the Free version is the CodeLens Tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I spoke with Advanced Solutions(Our Autodesk Reseller) and they stated that we should be able to accomplish all of this with the free version. So we had a coding session today and accomplished all but the checkout with what's available with Inventor Vault Add-In. We already have a dll&amp;nbsp;file we use for other functionality which we coded in VS 2017 and just added the checkout function to that dll. And now when we open an&amp;nbsp;idw&amp;nbsp;file it checks to see if the file is checked out, if not it checks it out.&amp;nbsp; And the same for any model file that is referenced in the idw. Then the code checks to see if all the iproperties we require in the model exist and if they do not it creates them, then updates our rev level and clears out all the approvals so we can submit it for approvals in the automated system we are creating. Thanks for your help fella's, we appreciate the time that all of you took to help us with this question.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 17:37:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-question/m-p/8250651#M88482</guid>
      <dc:creator>sgwilliams</dc:creator>
      <dc:date>2018-09-06T17:37:48Z</dc:date>
    </item>
  </channel>
</rss>

