ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Export group's name to excel (xlsm) or notepad .txt or .doc etc
Submitted by Gabriel Corazza on Sun, 2014-08-10 14:53
I am needing to export only the group name without exporting the names of objects, only the group name on a list to send the client to separate the furniture, lighting etc.
Is it possible?
I don't know abouth that limitation because never before print that count. Probabli is some memory problem. This works (1 million lines *.txt file)
fn printAllGroups txtFile =
(array = for i in 1 to 1e6 collect i as string ; gc light:on
(dotnetclass "System.IO.File").WriteAllLines txtFile array)
printAllGroups @"c:\temp\numbers.txt"
Branko, for some reason(unknown to me) WriteAllLines have one dissadvantage - it can't print more than 80 000 lines. I think that was the correct number, or it is close to the correct.
In the past I created a script that prints about 300 000 lines in a single file. Then I discover that WriteAllLines can't help in such a situation.
fn printAllGroups txtFile =
(
helper = for node in helpers where isGroupHead node collect node.name
if helper.count == 0 then messageBox "No Groups in the scene!" title:"INFO" beep:off else((dotnetclass "System.IO.File").WriteAllLines txtFile helper ; free helper
))
printAllGroups @"c:\temp\SceneGroups.txt"
Comments
...
I don't know abouth that limitation because never before print that count. Probabli is some memory problem. This works (1 million lines *.txt file)
bga
.
I have to find the script and the exact problem with writealllines.
Tools and Scripts for Autodesk 3dsMax
.
Branko, for some reason(unknown to me) WriteAllLines have one dissadvantage - it can't print more than 80 000 lines. I think that was the correct number, or it is close to the correct.
In the past I created a script that prints about 300 000 lines in a single file. Then I discover that WriteAllLines can't help in such a situation.
Tools and Scripts for Autodesk 3dsMax
...
BTW you can choose any file extension (.doc, .txt, xlsm)
;)
bga
...
Try this fn. Also change filename path
bga
OMG
It's Perfect! That was very fast. I'm impressed.
Thank you very much. I can make a donation in return?