hi, I would like to acces (change) project data from c# script node, accessing scene data via this.scene is quite easy. I understand it is possible by using remoting4 in script. but i am not very skilled in c# and am not able to figure this out. could you somebody help me pls.
thanks a lot
Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
chagne project data from c# script
Moderator: Support
Re: chagne project data from c# script
Hi dekacko,
there are two steps in order to accomplish that.
1. Create and initiate a cluster object of your local machine.
2. Now you can access the loaded project's data model somewhere in your code using a String for the full item's Address Path and an object of the type of the data channel as the first two arguments of the Cluster.ProjectDataItem Method.
Another overload of that same method without the "value" argument can be used to get the current value of an item.
Best,
Stephen
there are two steps in order to accomplish that.
1. Create and initiate a cluster object of your local machine.
Code: Select all
using Ventuz.Remoting4;
using System.Net;
//...
private Cluster cluster = null;
//this can be called e.g. by a Method on the Script Node
private void ConnectToLocalMachine()
{
IPAddress ipAdr = IPAddress.Parse("127.0.0.1");
this.cluster = new Cluster { Name = "Local" };
this.cluster.AddMachine(new IPEndPoint(ipAdr, Cluster.DEFAULT_PORT));
this.cluster.Start();
}
Code: Select all
if(this.cluster != null)
{
try
{
this.cluster.ProjectDataItem(".ProjectDataFolder.ItemName", 23, null, null);
}
}
Best,
Stephen
Re: chagne project data from c# script
Hi Stephen,
thank you very much for your help. works like a charm!
many thanks
thank you very much for your help. works like a charm!
many thanks