"$.name" doesn't know what to do because you're not specifying what objects name to get. You need to loop through the objects and get all their names, like such: out_name = ((GetDir #export)+"/test.txt")out_file = createfile out_namefor curObj in (selection as array) do (format "Name:% \n" curObj.name to:out_file)close…
Because getDirectories returns an array, you'd get the first element and then add the file name afterwards: out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop"))[1] + "test.txt"
Hello.I'm Trying to code geometry data to .txt file. For 1 mesh my script working but for 2 or more i have an error. "-- Unknown property: "name" in $selection"Can anybody help me with that?
Still I have no idea how maxscript can save it to desktop, Im trying to add /text.txt to end of line but still get error out_name = (getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"/Desktop/text.txt")) out_file = createfile out_name for curObj in (selection as array) do (format "Name:% \n" curObj.name…