Esempio n. 1
0
        private IPipePoint GetPointObject()
        {
            IPipePoint pPipePoint  = null;
            AcadObject pAcadObject = PickObject();

            if (pAcadObject == null)
            {
                return(null);
            }
            if (pAcadObject.ObjectName.Equals("AcDbText") || pAcadObject.ObjectName.Equals("AcDbMInsertBlock"))
            {
                AcadDictionary pAcadDictionary = pAcadObject.GetExtensionDictionary();
                if (pAcadDictionary.Count > 1)
                {
                    AcadXRecord pAcadXRecord1 = pAcadDictionary.Item(1) as AcadXRecord;

                    AcadXRecord pAcadXRecord2 = pAcadDictionary.Item(0) as AcadXRecord;
                    string      TableName, ID;
                    if (pAcadXRecord1.Name.StartsWith("PS_"))
                    {
                        TableName = pAcadXRecord1.Name;
                        ID        = pAcadXRecord2.Name;
                    }
                    else
                    {
                        TableName = pAcadXRecord2.Name;
                        ID        = pAcadXRecord1.Name;
                    }
                    //if( )
                    pPipePoint = Pipeobject.GetDataByID(ID, TableName) as IPipePoint;
                    return(pPipePoint);
                }
            }
            return(null);
        }
Esempio n. 2
0
        private string GetPointID()
        {
            //IPipePoint pPipePoint = null;
            AcadObject pAcadObject = PickObject();

            if (pAcadObject == null)
            {
                return(null);
            }
            if (pAcadObject.ObjectName.Equals("AcDbText") || pAcadObject.ObjectName.Equals("AcDbMInsertBlock"))
            {
                AcadDictionary pAcadDictionary = pAcadObject.GetExtensionDictionary();
                if (pAcadDictionary.Count == 1)
                {
                    string ID = (pAcadDictionary.Item(0) as AcadXRecord).Name;
                    return(ID);

                    /*  string SURVEYID = GetPointSURVEYID(ID);
                     * if (SURVEYID != string.Empty)
                     * {
                     *
                     *    return SURVEYID;
                     * }
                     * else return string.Empty;*/
                }
            }
            return(string.Empty);
        }