Inventor Customization

Reply
Member
melanie2012
Posts: 4
Registered: ‎05-03-2012
Message 1 of 2 (396 Views)
Accepted Solution

Vault Add-in (Check-in)

396 Views, 1 Replies
06-04-2012 08:56 AM

i have an external rule opening drawings for all unsuppressed parts and assemblies.  The code below automates the check-in process.  I  enabled Automatic Log In and Suppressed "Check-in" dialog and the check-in was smooth for instances where adding in a file were not required.  My one snag is that I need to add comments.  I now have taken out the dialog box Suppression and it has sped up checking in files, but I was wondering if there was a was to pass along a comment from a Message Input box.  The comment would be the same for any parts which changed, so I could suppress the "Check-in" dialog box and still get a comment applied to that compontent.

 

ForEachodocAsInventor.DocumentInThisApplication.Documents
DimappAsInventor.Application=ThisApplication
DiminvdocAsInventor.Document=app.ActiveDocument
DimopathandnameAsString=invdoc.FullFilename
DimoextensionAsString=Right(opathandname,3)
DimposnAsInteger=0
posn=InStrRev(opathandname, ".")
Ifposn<>0Then

Ifoextension="dwg"Then

ThisApplication.ActiveDocument.Save
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute

'Close drawing file(s)
invdoc.Close(False)

'Clear out Addin variable string(s)
onamenoextension=Nothing
EndIf

EndIf

'Clear out application variable String(s)
opathandname=Nothing
posn=Nothing
oextension=Nothing

Next

Thanks in advance,

*Expert Elite*
jdkriek
Posts: 528
Registered: ‎03-29-2007
Message 2 of 2 (356 Views)

Re: Vault Add-in (Check-in)

06-11-2012 01:58 PM in reply to: melanie2012

First you need to have the command wait for you if you hope to fill in the comments.

 

ControlDefinitions.Item("VaultCheckinTop").Execute2(True)

I've not had any luck actually filling in the comments though. Decided that we didn't need them after all, especially since it was being followed by an automatic state change to Release which was pretty much self-explanatory.

Jonathan D. Kriek

Autodesk Inventor Certified Expert
Microsoft Certified Application Developer
_____________________________________________________
Did I help you? Please choose Accept as Solution or Kudos below

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube