Write in UDAs of the part
Hi all,
This application with write a text in Parts UDA,
to create this use a console application c# (.NET Framework)
============================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tekla.Structures;
using Tekla.Structures.Model;
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;
using TS = Tekla.Structures;
using TSM = Tekla.Structures.Model;
using TSU = Tekla.Structures.UI;
using TSG = Tekla.Structures.Geometry3d;
namespace Status_SENT
{
class Program
{
static void Main(string[] args)
{
//System.Diagnostics.Process.Start("http://www.shaymurtagh.ie");
Tekla.Structures.Model.Model TSM = new Tekla.Structures.Model.Model();
Tekla.Structures.Model.ModelObjectEnumerator baseEnum = new Tekla.Structures.Model.UI.ModelObjectSelector().GetSelectedObjects();
while (baseEnum.MoveNext())
{
int ID = baseEnum.Current.Identifier.ID;
Tekla.Structures.Identifier TeklaID = new Tekla.Structures.Identifier(ID);
Tekla.Structures.Model.ModelObject mo = TSM.SelectModelObject(TeklaID);
mo.SetUserProperty("PLANS_STATUS", "SENT");
/*
string order_n = "";
mo.GetUserProperty("SM_Order_01", ref order_n);
string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n;
System.Diagnostics.Process.Start(jarvis_url);
*/
}
//ViewExample1();
}
This application with write a text in Parts UDA,
to create this use a console application c# (.NET Framework)
============================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tekla.Structures;
using Tekla.Structures.Model;
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;
using TS = Tekla.Structures;
using TSM = Tekla.Structures.Model;
using TSU = Tekla.Structures.UI;
using TSG = Tekla.Structures.Geometry3d;
namespace Status_SENT
{
class Program
{
static void Main(string[] args)
{
//System.Diagnostics.Process.Start("http://www.shaymurtagh.ie");
Tekla.Structures.Model.Model TSM = new Tekla.Structures.Model.Model();
Tekla.Structures.Model.ModelObjectEnumerator baseEnum = new Tekla.Structures.Model.UI.ModelObjectSelector().GetSelectedObjects();
while (baseEnum.MoveNext())
{
int ID = baseEnum.Current.Identifier.ID;
Tekla.Structures.Identifier TeklaID = new Tekla.Structures.Identifier(ID);
Tekla.Structures.Model.ModelObject mo = TSM.SelectModelObject(TeklaID);
mo.SetUserProperty("PLANS_STATUS", "SENT");
/*
string order_n = "";
mo.GetUserProperty("SM_Order_01", ref order_n);
string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n;
System.Diagnostics.Process.Start(jarvis_url);
*/
}
//ViewExample1();
}
Comentários
Enviar um comentário