![]() ![]() SelectionFilter dsSelectionFilter = dsSelectionManager.GetSelectionFilter() ĭsSelectionFilter.AddEntityType(dsObjectType_e.dsBlockInstanceType) ĭsSelectionManager.ClearSelections(dsSelectionSetType_e.dsSelectionSetType_Previous) SelectionManager dsSelectionManager = dsDoc.GetSelectionManager() Object blocks = dsBlkDefinition.GetBlockInstances() ![]() found block that I need to select and print ![]() String outputFileLocationName = all Block definitions in the drawingĭsVarBlkDefinitions = (object)dsDoc.GetBlockDefinitions() ĭsBlock = new object įor (int index = 0 index < dsVarBlkDefinitions.Length index++)įor (index = dsVarBlkDefinitions.GetLowerBound(0) index <= dsVarBlkDefinitions.GetUpperBound(0) index++)ĭsBlkDefinition = (BlockDefinition)dsVarBlkDefinitions ViewManager dsViewManager = default(ViewManager) SketchManager dsSketchManeger = default(SketchManager) MathPoint oppositeCorner = default(MathPoint) MathPoint startCorner = default(MathPoint) MathUtility dsMathUtility = default(MathUtility) public static void BlockSelection()ĭ dsApp ĭsApp = ()Marshal.GetActiveObject("DraftSight.Application") ĭsApp.AbortRunningCommand() // abort any command currently running in DraftSight to avoid nested commandsĭsDoc = (Document)dsApp.GetActiveDocument() īlockDefinition dsBlkDefinition = default(BlockDefinition) ĭ dsViewport = default() I'm sure it's several different ways to do it.Īny help will be appreciated. Not familiar with DraftSight and DraftSight API. I will insert a code snippet that I have. I can find border by name but I can not take border coordination or at least one point to select the border and then print only that border. I need to select a specific block/border on the drawing and print that block/border as a PDF. ![]()
0 Comments
Leave a Reply. |