コード例 #1
0
        public static string ToSchemaName(this StepSchemaTypes type)
        {
            switch (type)
            {
            case StepSchemaTypes.AssociativeDraghting:
                return(AssociativeDraghtingText);

            case StepSchemaTypes.AutomotiveDesign:
                return(AutomotiveDesignText);

            case StepSchemaTypes.BuildingDeisgn:
                return(BuildingDesignText);

            case StepSchemaTypes.CastParts:
                return(CastPartsText);

            case StepSchemaTypes.ConfigControlDesign:
                return(ConfigControlDesignText);

            case StepSchemaTypes.DimensionalInspectionSchema:
                return(DimensionalInspectionText);

            case StepSchemaTypes.ElectronicAssemblyInterconnect:
                return(ElectronicAssemblyInterconnectText);

            case StepSchemaTypes.EngineeringProperties:
                return(EngineeringPropertiesText);

            case StepSchemaTypes.ExplicitDraughting:
                return(ExplicitDraughtingText);

            case StepSchemaTypes.FeatureBasedProcessPlanning:
                return(FeatureBasedProcessPlanningText);

            case StepSchemaTypes.FunctionalDataAndSchematics:
                return(FunctionalDataAndSchematicsText);

            case StepSchemaTypes.FurnitureCatalogAndInteriorDesign:
                return(FurnitureCatalogAndInteriorDesignText);

            case StepSchemaTypes.IntegratedCNC:
                return(IntegratedCNCText);

            case StepSchemaTypes.ManagedModelBased3DEngineering:
                return(ManagedModelBased3DEngineeringText);

            case StepSchemaTypes.PlantSpatialConfiguration:
                return(PlantSpatialConfigurationText);

            case StepSchemaTypes.ProcessPlanning:
                return(ProcessPlanningText);

            case StepSchemaTypes.ProductLifeCycleSupport:
                return(ProductLifeCycleSupportText);

            case StepSchemaTypes.ShipArrangement:
                return(ShipArrangementText);

            case StepSchemaTypes.ShipMouldedForm:
                return(ShipMouldedFormText);

            case StepSchemaTypes.ShipStructures:
                return(ShipStructuresText);

            case StepSchemaTypes.StructuralAnalysisDesign:
                return(StructuralAnalysisDesignText);

            case StepSchemaTypes.TechnicalDataPackaging:
                return(TechnicalDataPackagingText);

            default:
                throw new ArgumentException($"Unsupported schema type '{type}'", nameof(type));
            }
        }
コード例 #2
0
        public static bool TryGetSchemaTypeFromName(string schemaName, out StepSchemaTypes schemaType)
        {
            switch (schemaName)
            {
            case AssociativeDraghtingText:
                schemaType = StepSchemaTypes.AssociativeDraghting;
                break;

            case AutomotiveDesignText:
                schemaType = StepSchemaTypes.AutomotiveDesign;
                break;

            case BuildingDesignText:
                schemaType = StepSchemaTypes.BuildingDeisgn;
                break;

            case CastPartsText:
                schemaType = StepSchemaTypes.CastParts;
                break;

            case ConfigControlDesignText:
            case ConfigurationControlled3DDesignText:
                schemaType = StepSchemaTypes.ConfigControlDesign;
                break;

            case DimensionalInspectionText:
                schemaType = StepSchemaTypes.DimensionalInspectionSchema;
                break;

            case ElectronicAssemblyInterconnectText:
                schemaType = StepSchemaTypes.ElectronicAssemblyInterconnect;
                break;

            case EngineeringPropertiesText:
                schemaType = StepSchemaTypes.EngineeringProperties;
                break;

            case ExplicitDraughtingText:
                schemaType = StepSchemaTypes.ExplicitDraughting;
                break;

            case FeatureBasedProcessPlanningText:
                schemaType = StepSchemaTypes.FeatureBasedProcessPlanning;
                break;

            case FunctionalDataAndSchematicsText:
                schemaType = StepSchemaTypes.FunctionalDataAndSchematics;
                break;

            case FurnitureCatalogAndInteriorDesignText:
                schemaType = StepSchemaTypes.FurnitureCatalogAndInteriorDesign;
                break;

            case IntegratedCNCText:
                schemaType = StepSchemaTypes.IntegratedCNC;
                break;

            case ManagedModelBased3DEngineeringText:
                schemaType = StepSchemaTypes.ManagedModelBased3DEngineering;
                break;

            case PlantSpatialConfigurationText:
                schemaType = StepSchemaTypes.PlantSpatialConfiguration;
                break;

            case ProcessPlanningText:
                schemaType = StepSchemaTypes.ProcessPlanning;
                break;

            case ProductLifeCycleSupportText:
                schemaType = StepSchemaTypes.ProductLifeCycleSupport;
                break;

            case ShipArrangementText:
                schemaType = StepSchemaTypes.ShipArrangement;
                break;

            case ShipMouldedFormText:
                schemaType = StepSchemaTypes.ShipMouldedForm;
                break;

            case ShipStructuresText:
                schemaType = StepSchemaTypes.ShipStructures;
                break;

            case StructuralAnalysisDesignText:
                schemaType = StepSchemaTypes.StructuralAnalysisDesign;
                break;

            case TechnicalDataPackagingText:
                schemaType = StepSchemaTypes.TechnicalDataPackaging;
                break;

            default:
                schemaType = default(StepSchemaTypes);
                return(false);
            }

            return(true);
        }