示例#1
0
        private Point2d GetPlacementPoint(ChainDimensionSet chainSet)
        {
            var line    = (chainSet.Members[1] as LinearGeneralDimension).ExtensionLineOne;
            var segment = line as LineSegment2d;

            return(segment.EndPoint);
        }
示例#2
0
        private void ProccessChainSet(Sheet drawingActiveSheet, ChainDimensionSet chainSet)
        {
            var intents        = GetIntentsFromChainSet(chainSet);
            var placementPoint = GetPlacementPoint(chainSet);
            var dimensionType  = chainSet.DimensionType;

            drawingActiveSheet.DrawingDimensions.OrdinateDimensionSets.Add(intents, placementPoint, dimensionType);
        }
示例#3
0
        private ObjectCollection GetIntentsFromChainSet(ChainDimensionSet chainSet)
        {
            var memberCount = chainSet.Members.Count;
            var collection  = InventorApplication.TransientObjects.CreateObjectCollection();

            for (int i = 1; i <= memberCount; i++)
            {
                var intent = (chainSet.Members[i] as LinearGeneralDimension).IntentOne;
                collection.Add(intent);
            }
            var intentLast = (chainSet.Members[memberCount] as LinearGeneralDimension).IntentTwo;

            collection.Add(intentLast);
            return(collection);
        }