Showing posts with label Logical Topology. Show all posts
Showing posts with label Logical Topology. Show all posts

Monday, November 16, 2015

Map3D Industry Model : SQL Query Logical Topology Connection & Jobs

SQL Query

select topo.fid, topo.FID_FROM, topo.F_CLASS_ID_FROM,
dic2.F_CLASS_NAME CLASSNAME_FROM, topo.FID_TO, topo.F_CLASS_ID_TO, dic.F_CLASS_NAME CLASSNAME_TO,  topo.FLOW,
j.id, j.NAME, j.COMMENTARY,
jv.STATE
from 
RNT_NODE_EDGE_TOPO_CONN topo, TB_DICTIONARY dic, TB_DICTIONARY dic2, TB_JOB j, TB_JOB_VERSION jv
where dic.F_CLASS_ID = topo.F_CLASS_ID_TO
and dic2.F_CLASS_ID = topo.F_CLASS_ID_FROM
and j.id = jv.JOB_ID
and jv.JOB_VERSION = topo.JOB_VERSION;



flow 

  • (1,forward) 
  • (2,backward) 
  • (3, forward and backward)

state

select * from tb_job_state;


Tuesday, June 16, 2015

Reset Logical Topology Map3D Industry Model

 /// <summary>
        /// Reset the topology of the industry model currently connected to.
        /// </summary>
        public static void ResetTopology()
        {
            var application = Application.Active;
            var connection = application.Documents.Active.Connection;

            using (var ma = new Topobase.LogicalTopology.Maintainance(connection))
            {
                connection.Open();
                //Make sure there are topologies to clear
                if (connection.Topologies != null)
                {
                    for (int i = 0; i < connection.Topologies.Count; i++)
                    {
                        //Check the type of the topologies before clearing them.
                        //Make sure they are logical topologies and not area
   var topology =     
   connection.Topologies.Get(connection.Topologies[i].Name);
                        var logicalToplogy = topology as LogicalTopology;
                        //Clear topology attached to the industry model
                        ma.ClearTopology(logicalToplogy, null);
                        //Initialize topolgy of the current industy model
                        ma.InitializeTopology(logicalToplogy, null);
                    }
                }
            }
        }