Inventor General Discussion

Reply
Distinguished Contributor
waynehelley
Posts: 105
Registered: ‎09-10-2012
Message 1 of 1 (456 Views)

Use ilogic/VBA to check a list of drawings into Vault

456 Views, 0 Replies
11-23-2012 12:31 AM

Hi there,

 

I have a large set of drawings which are all very similar as they were created from the same iassembly factory.  I have been using ilogic to go through the set of drawings and make changes.  In the example below I have used ilogic to delete the current parts list and replace it with a corrected version:

DimiAsInteger
DimoMemberFileAsString

'Enter the last four digits of iAssembly members for which drawings will be generated
Fori=4982To5018

'Get the full file name of iAssembly member
oMemberFile="C:\ARTICULATE\09\090\09090GT0000023\09090G0010"&CStr(i)

ThisDoc.Launch(oMemberFile&".idw")

DimoDrawingDocAsDrawingDocument
oDrawingDoc=ThisApplication.ActiveDocument

DimoSheetAsSheet
oSheet=oDrawingDoc.ActiveSheet

'Delete the current parts list
DimoPartsListAsPartsList
oPartsList=oDrawingDoc.ActiveSheet.PartsLists.Item(1)
oPartsList.Delete

' Set a reference to the first drawing view on
' the sheet. This assumes the first drawing
' view on the sheet is not a draft view.
DimoDrawingViewAsDrawingView
oDrawingView=oSheet.DrawingViews(1)

' Set a reference to the sheet's border
DimoBorderAsBorder
oBorder=oSheet.Border

DimoPlacementPointAsPoint2d

xrev=oBorder.RangeBox.MaxPoint.X
yrev=oBorder.RangeBox.MaxPoint.Y

oPlacementPoint=ThisApplication.TransientGeometry.CreatePoint2d(xrev, yrev)

' Create the parts list.
DimoPartsList1AsPartsList
oPartsList1=oSheet.PartsLists.Add(oDrawingView, oPlacementPoint)
oPartsLis1t=oDrawingDoc.ActiveSheet.PartsLists.Item(1)
oPartsList1.Sort("ITEM", 1)

'Save copy as one new idw using the member name
oDrawingDoc.Save
oDrawingDoc.Close

Next

I want to add a line of code so that once the document has been saved, it will then be checked into Vault.  Is this possible using ilogic or would I have to use the VBA?

 

Thanks,

 

Wayne

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2013
Windows 7 Enterprise, 64-bit

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