Created
November 25, 2021 20:52
-
-
Save AmenJlili/1f794a7c5ea86f6d88cbf4c739f4d47b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetTitle2(this ModelDoc2 model) | |
{ | |
var extension = string.Empty; | |
if (model.GetType() == (int)swDocumentTypes_e.swDocPART) | |
extension = ".sldprt"; | |
else | |
extension = ".sldasm"; | |
var title = model.GetTitle(); | |
if (System.IO.Path.HasExtension(title)) | |
return title; | |
else | |
return $"{title}{extension}"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment