Autodesk Inventor
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Use ilogic/VBA to check a list of drawings into Vault
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
238 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 2011
Windows 7 Enterprise, 64-bit
Inventor 2013 Certified Professional
Autodesk Inventor Professional 2011
Windows 7 Enterprise, 64-bit

