07-11-2019
07:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-11-2019
07:25 AM
Felix,
You can use the ModelDocument code snippet from Advanced Drawing API. This will retrieve the model associated to the drawing. If there's more than one model, it will pick the first one. If there is more than one model, you can use the ModelDocument(View) snippet and this will let you define the view name and it will retrieve the model associated to the view. Once the model is retrieved, which is a document object, you can get different properties such as Displayname, FillFileName, etc.
So the code will look something like this. Hope that helps.
DanV
doc = ThisDrawing.ModelDocument 'from the Model Document snippet MessageBox.Show(doc.FullDocumentName) 'use FullDocumentName to get path & file name MessageBox.Show(doc.DisplayName) 'use to get the file name only