Horje
solidworks macro get pathname without filename Code Example
solidworks macro get pathname without filename
' PathName of current model document
Dim sModelFullPath As String
sModelFullPath = swModel.GetPathName

' get path name without filename
Dim sFilePath As String
sFilePath = Left(sModelFullPath, InStrRev(sModelFullPath, "\"))

' get filename and extension
Dim sFileName As String
sFileName = Right(sModelFullPath, Len(sModelFullPath) - InStrRev(sModelFullPath, "\"))

' get filename without extension
Dim sFileNameWithoutExtension As String
sFileNameWithoutExtension = Left(sFileName, InStrRev(sFileName, ".") - 1)

' combine everything to new path name
Dim sNewFullPath As String
sNewFullPath = prefix & sFileNameWithoutExtension & "REV" & CurrRev & ".pdf"

' SaveAs with new full path
Set swExportPDFData = swApp.GetExportFileData(1)
swModel.Extension.SaveAs sNewFullPath, 0, 0, swExportPDFData, 0, 0




Whatever

Related
shortcut to search a webpage Code Example shortcut to search a webpage Code Example
what is the best enchantment for a netherite pickaxze Code Example what is the best enchantment for a netherite pickaxze Code Example
cassandra keeps restarting in docker Code Example cassandra keeps restarting in docker Code Example
how to reload the page without startinfg the server again in spring mvc Code Example how to reload the page without startinfg the server again in spring mvc Code Example
roblox how to get a user id Code Example roblox how to get a user id Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7