Message 1 of 9
Saving new drawing using forum button as same name and location as part.

Not applicable
02-26-2020
09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am having trouble writing a rule to save a drawing. When a part is finished and a new drawing is made then finished, I would like to hit a button that saves the drawing the same as the part name/location without a window popping up.
The problem with my code is that since it is a save as, it creates a file separate to my working drawing. I was thinking it might be possible if the code closes the active drawing and opens the 'save as' drawing. So far this is what I have:
modelFullFileName = ThisDoc.ModelDocument.FullFileName modelDirectoryName = IO.Path.GetDirectoryName(modelFullFileName) modelFileName = IO.Path.GetFileName(modelFullFileName) modelFileNamewithoutextentionsion = IO.Path.GetFileNameWithoutExtension(modelFullFileName) ThisDoc.Document.SaveAs(modelDirectoryName & "\" & modelFileNamewithoutextentionsion & ".IDW", True)