- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @WCrihfield ,
Thank you so much for your good explanation.
Thank you for your code.
Unfortunately the rule cannot delete all the borders.
in the above code it says:
'delete all unreferenced BorderDefinitions For Each oBDef As BorderDefinition In oDrawingDoc.BorderDefinitions If (Not oBDef.IsDefault) AndAlso (Not oBDef.IsReferenced) Then oBDef.Delete() End If Next oBDef
The problem seems to be that those borders are "referenced" and therefore cannot be deleted.
I do not quite understand, why those borders are referenced since they are not on the sheets (because your code deletes the borders on the sheets in line 31).
Is it, that Inventor has not realized that they have been deleted and that is why they are still referenced?
(Autodesk help says: A border definition is referenced whenever it is used on a sheet. A referenced border definition cannot be deleted.)
Since the rule cannot delete the borders it adds "copy of..".
Do you know how to delete the initial borders in the drawing recourses?