Print/Format selected Obj's
With the code below I get his result.
"name:Point01 pos:[5,5,5] rot:(quat 0 0 0 1) wirecolor:red"
but I want this to be the result.
name:"Point01" pos:[5,5,5] rot:(quat 0 0 0 1) wirecolor:red
The scene setup is just having a selection of a point helper/s and the run the code.
Thanks
JokerMartini
clearListener() for obj in helpers do ( PtName = obj.name as string PtPos = obj.pos as string PtRot = obj.rotation as string print ("name:" + PtName + " pos:" + PtRot + " rot:" + PtRot + " wirecolor:red") )

Comments
SOLVED
NOTE: mb needs to be classed as a string in order to work
NOW: How to get the result to a messgebox
Thanks for the starting point guys but I was wondering how to get this result to a messagebox instead. Similar topic so I thought I'd shout out here.
the for loop results in the listener as:
Also if it can work then how to go about removing the
OK.It's maybe not possible this way as the messagebox comes up as
undefined. Any help is greatly appreciated.just add line break "\n" at
just add line break "\n" at the end:
format "name:\"%\" pos:% rot:% wirecolor:red\n" obj.name obj.pos obj.rotationmy recent MAXScripts RSS (archive here)
Thanks Swordslayer
When i run the script on multiple objects it is formatting them all onto one line in the listener. I'll need it to print each obj separately onto a different line.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
If I understand it right,
If I understand it right, this could do it:
format "name:\"%\" pos:% rot:% wirecolor:red" obj.name obj.pos obj.rotationSome of my scripts and MCGs :: 3ds Max SDK Intro for Scripters