FYI- I couldn't figure out why some of my macros ran differently on different PC's. Finally I found that swmodel.gettitle gives different results based on windows settings.
PC1 - ABC123
PC2 - ABC123.SLDASM
I have read that some people prefer to use swmodel.getpathname instead and strip out the file name from that string instead.