当前位置: 首页>>代码示例>>C#>>正文


C# FamilySymbol.GetEntity方法代码示例

本文整理汇总了C#中FamilySymbol.GetEntity方法的典型用法代码示例。如果您正苦于以下问题:C# FamilySymbol.GetEntity方法的具体用法?C# FamilySymbol.GetEntity怎么用?C# FamilySymbol.GetEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FamilySymbol的用法示例。


在下文中一共展示了FamilySymbol.GetEntity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StorageExists

        //-----------------------------------
        public bool StorageExists(FamilySymbol titleblock)
        {
            IList<Schema> schemas = Schema.ListSchemas();

            foreach (Schema schema in schemas)
            {
                try
                {
                    Entity entity = titleblock.GetEntity(schema);
                    if (entity.IsValid())
                    {
                        return true;
                    }
                }
                catch { }

            }
            return false;
        }
开发者ID:dannysbentley,项目名称:alignviewtosheetcell,代码行数:20,代码来源:SchemaAndStoreData.cs

示例2: RetrieveData

        public void RetrieveData(FamilySymbol titleblock)
        {
            string[] objects = new string[9];

            Schema schema = Schema.Lookup(new Guid("1a68d420-96dd-44aa-a1de-000774a6104b"));
            // get the field from the schema
            Field field_titleblockName = schema.GetField("titleblockName");

            Field field_cellSizeDistance_X = schema.GetField("cellSizeDistance_X");
            Field field_lowerGap_X = schema.GetField("lowerGap_X");
            Field field_additionalEdge_X = schema.GetField("additionalEdge_X");
            Field field_fineTune_X = schema.GetField("fineTune_X");

            Field field_cellSizeDistance_Y = schema.GetField("cellSizeDistance_Y");
            Field field_lowerGap_Y = schema.GetField("lowerGap_Y");
            Field field_additionalEdge_Y = schema.GetField("additionalEdge_Y");
            Field field_fineTune_Y = schema.GetField("fineTune_Y");

            Field field_cellGrid_Length = schema.GetField("cellGrid_Length");
            Field field_cellGrid_Height = schema.GetField("cellGrid_Height");

            // get the data back from the titleblock
            Entity retrievedEntity = titleblock.GetEntity(schema);
            string retrievedData_titleblockName = retrievedEntity.Get<string>(schema.GetField("titleblockName"));

            string retrievedData_cellSizeDistance_X = retrievedEntity.Get<string>(schema.GetField("cellSizeDistance_X"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_lowerGap_X = retrievedEntity.Get<string>(schema.GetField("lowerGap_X"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_additionalEdge_X = retrievedEntity.Get<string>(schema.GetField("additionalEdge_X"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_fineTune_X = retrievedEntity.Get<string>(schema.GetField("fineTune_X"), DisplayUnitType.DUT_DECIMAL_INCHES);

            string retrievedData_cellSizeDistance_Y = retrievedEntity.Get<string>(schema.GetField("cellSizeDistance_Y"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_lowerGap_Y = retrievedEntity.Get<string>(schema.GetField("lowerGap_Y"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_additionalEdge_Y = retrievedEntity.Get<string>(schema.GetField("additionalEdge_Y"), DisplayUnitType.DUT_DECIMAL_INCHES);
            string retrievedData_fineTune_Y = retrievedEntity.Get<string>(schema.GetField("fineTune_Y"), DisplayUnitType.DUT_DECIMAL_INCHES);

            //string retrievedData_cellGrid = retrievedEntity.Get<string>(schema.GetField("cellGrid"));
            string retrievedData_cellGrid_Length = retrievedEntity.Get<string>(schema.GetField("cellGrid_Length"));
            string retrievedData_cellGrid_Height = retrievedEntity.Get<string>(schema.GetField("cellGrid_Height"));

            titleblockName = retrievedData_titleblockName;

            cellSizeDistance_X = retrievedData_cellSizeDistance_X;
            lowerGap_X = retrievedData_lowerGap_X;
            additionalEdge_X = retrievedData_additionalEdge_X;
            fineTune_X = retrievedData_fineTune_X;

            cellSizeDistance_Y = retrievedData_cellSizeDistance_Y;
            lowerGap_Y = retrievedData_lowerGap_Y;
            additionalEdge_Y = retrievedData_additionalEdge_Y;
            fineTune_Y = retrievedData_fineTune_Y;

            cellGrid_Length = retrievedData_cellGrid_Length;
            cellGrid_Height = retrievedData_cellGrid_Height;
        }
开发者ID:dannysbentley,项目名称:alignviewtosheetcell,代码行数:54,代码来源:SchemaAndStoreData.cs


注:本文中的FamilySymbol.GetEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。