- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dears,
I can't get Filename; FilePath... via API. I often do it with iLogic with simple code:
ThisDoc.Path ThisDoc.FileName(False) 'without Extension ThisDoc.PathAndFileName(False)
but with API I don't know how. Please help me an idea. Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Here are some lines of code that you can use for that sort of thing.
Dim oDoc As Document = ThisApplication.ActiveDocument Dim oPath As String = System.IO.Path.GetDirectoryName(oDoc.FullFileName) Dim oName As String = System.IO.Path.GetFileNameWithoutExtension(oDoc.FullFileName) Dim oNameAndExt As String = System.IO.Path.GetFileName(oDoc.FullFileName) Dim oExt As String = System.IO.Path.GetExtension(oDoc.FullFileName)
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS)
.
Wesley Crihfield
(Not an Autodesk Employee)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @ngnam1988. Glad I was able to help out some.
By the way, here are a few related links you might find helpful, on the same general subject.
https://knowledge.autodesk.com/community/article/401261
https://knowledge.autodesk.com/community/article/353376
https://knowledge.autodesk.com/community/article/408641
Wesley Crihfield
(Not an Autodesk Employee)