Message 1 of 5

Not applicable
02-12-2014
07:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an external rule that opens all parts in an assembly and performs a series of tasks to these parts. One task is to print the drawing for the part, if there is one. I would like to add the task of changing the border of the drawing. I can get a rule to accomplish this with one single drawing open. But I need to be able to go through all drawings associated to all the parts in an assembly. Here is a small example of one of the code variations I have used to try and accomplish this, it just will not work. Any help would be very much welcomed.
Dim oDrawDoc As DrawingDocument
oDrawDoc=ThisApplication.Documents.Open(idwPathName, True)
oDrawDoc.Activate
oDrawDoc=ThisApplication.ActiveDocument
Try
oDrawDoc.ResourceFileName="L:\Inventor\file.idw"
oDrawDoc.ActiveSheet.SetBorder("border", "", "")
Catch
EndTry
Solved! Go to Solution.