|
Node.Create(str, str)
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Node.Create(str, str) // Scriptorium
Post by stan // Aug 5, 2007, 4:43pm
stan
Total Posts: 1240
|
here is a mini tutorial on using Node.Create(str, str)
after writing the first bracket after Nose.Create( you need a ' or " to contain the first string. as you type the ' a droplist will appear. choose the type node you want to create from the list. end with a '
enter the destination for the node in the second string '/Project/Space 3D'
then the last )
my sample in the image shows an easy way of changing nodes from the droplist..simply delete the first ' [and name] then retype the '
the last image shows the sample script and a few nodes that were created
from the guide
Create (file:///E:/trueSpace7/tS/PDFMan/ScriptObjects/structIRiNodeItem.html#a2) ( BSTR idName,[in] VARIANT vOwner,[out, retval] VARIANT *pVal)
Creates object instance of given type in particular encapsulator
Parameters: [I]idName – identifier of tS object prototype (see Nodes reference doc for full list of available objects) vOwner – full name of owner (encapsulator) for newly created object bName – returns full name of newly created object Example: create new encapsulator object
Encaps = Node.Create('Kernel Package/Object', '/Project/Space 3D') |
Post by frootee // Aug 6, 2007, 3:45am
frootee
Total Posts: 2667
|
Thanks Stan. I played with this today. I was able to generate Shape objects.
It really helps to see examples like this; the DG is useful of course but being able to pair up an example with the document makes interpretation much easier.
Froo |
Post by frootee // Aug 8, 2007, 5:46am
frootee
Total Posts: 2667
|
here is a mini tutorial on using Node.Create(str, str)
Creates object instance of given type in particular encapsulator
Parameters: idName – identifier of tS object prototype (see Nodes reference doc for full list of available objects) vOwner – full name of owner (encapsulator) for newly created object bName – returns full name of newly created object Example: create new encapsulator object
Encaps = Node.Create('Kernel Package/Object', '/Project/Space 3D')
Hi stan. Question.
If I look in the Nodes reference (RsNodeDoc.xml) and look for a node that is in your example, say, the AspectToolbar, I cannot find it. Or, Windows Manager Package. Or, Space 3d Package. Not even Shape.
Basically, I am trying to translate the information in these documents to the example you have, by searching for the text in your example. But, I cannot seem to do so. Could you (or anyone else so inclined) help clarify the situation please?
Thanks!
Froo |
Post by stan // Aug 8, 2007, 6:00am
stan
Total Posts: 1240
|
frootee, the droplist is the complete list maybe not all have neen listed on the RsNodeDoc.xml..refering to the new RsNodeDoc.xml in your ts7.51 folder is the most current..
I came across how it worked by shear luck one day trying to get the example to work, which didn't ..;) |
Post by frootee // Aug 8, 2007, 6:55am
frootee
Total Posts: 2667
|
thanks stan.
Froo |
|