Jarvis_Connect
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TS = Tekla.Structures;
using TSM = Tekla.Structures.Model;
namespace Jarvis_Connect
{
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);
Tekla.Structures.Model.Assembly Ass = new TSM.Assembly();
string order_n = "";
string beam_name = "";
mo.GetUserProperty("SM_Order_01", ref order_n);
mo.GetReportProperty("CAST_UNIT_POS", ref beam_name);
string[] order_name = beam_name.Split('-');
double panel_num = 0;
Double.TryParse(order_name[1], out panel_num);
beam_name = order_name[0] + "-" + panel_num.ToString("00");
//Console.WriteLine(Name);
//Console.ReadLine();
//
// https://smp-as02-erp/intranet/w_pedidos/index.php?txped=SH180696&selRef=MB-13
// É necessarioi passar a referencia URLencoded
// selRef=System.Net.WebUtility.UrlEncode(strRefFromTekla)
//string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n;
string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n + "&selRef=" + beam_name;
System.Diagnostics.Process.Start(jarvis_url);
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TS = Tekla.Structures;
using TSM = Tekla.Structures.Model;
namespace Jarvis_Connect
{
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);
Tekla.Structures.Model.Assembly Ass = new TSM.Assembly();
string order_n = "";
string beam_name = "";
mo.GetUserProperty("SM_Order_01", ref order_n);
mo.GetReportProperty("CAST_UNIT_POS", ref beam_name);
string[] order_name = beam_name.Split('-');
double panel_num = 0;
Double.TryParse(order_name[1], out panel_num);
beam_name = order_name[0] + "-" + panel_num.ToString("00");
//Console.WriteLine(Name);
//Console.ReadLine();
//
// https://smp-as02-erp/intranet/w_pedidos/index.php?txped=SH180696&selRef=MB-13
// É necessarioi passar a referencia URLencoded
// selRef=System.Net.WebUtility.UrlEncode(strRefFromTekla)
//string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n;
string jarvis_url = @"http://192.168.1.58/intranet/w_pedidos/index.php?txped=" + order_n + "&selRef=" + beam_name;
System.Diagnostics.Process.Start(jarvis_url);
}
}
}
}
Comentários
Enviar um comentário