- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There is currently no Save As event trigger, only before save or after save. Is it possible to create a Save as trigger, or incorporate it into the iLogic code for the rule? Many of our parts are very similar to existing parts, so we open the existing part, save as new file name, then make the minor changes. We are adding a "similar to" box to our title block so the shop has a reference part they can look up their existing CNC program for and make the minor changes to the program and run it instead of writing a new program every time. I would like the "similar to" box to automatically populate on the drawing base on the part number of the original part, before the save as and new part creation. I wrote a code that is able to add the part number of the existing file into an iproperty of the new part, then I can link the iproperty to the "similar to" box. The only way the code works properly is with the before save event trigger though. The issue is that any subsequent save of the new part will then update the iproperty to the current part number. I am very new to iLogic program and don't have a fundamental understanding of it yet, so any help would be greatly appreciated. Below is the current code I am using.
Dim activeDocName As String = ThisApplication.ActiveDocument.FullFileName Dim thisDocName As String = ThisDoc.Document.FullFileName If (activeDocName = thisDocName) Then iProperties.Value("Summary", "Subject") = ThisDoc.FileName(False) 'without extension End If
Solved! Go to Solution.