private Point2d GetPlacementPoint(ChainDimensionSet chainSet) { var line = (chainSet.Members[1] as LinearGeneralDimension).ExtensionLineOne; var segment = line as LineSegment2d; return(segment.EndPoint); }
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); }
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); }