Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
DarthBane55
in reply to: constantin3x

Not sure if it is 100% what you are after, but I output this:

(POSTED FROM FILE=10048-M1-M2.MC1.IAM) (which is an Inventor file).

I get that output with this code:

 

var inventorFileName = FileSystem.getFilename(getGlobalParameter("document-path"));

writeComment("POSTED FROM FILE=" + inventorFileName);

 

Similar to your code, but it gets it from FileSystem...  This also works in Fusion, I use it there too, just change the variable name.