Message 1 of 6
Dimension Arrangement with Ilogic - Stacking of Linear Dimensions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all, long time lurker - 1st time poster
I've been experimenting with Ilogic code since i started with my new company, and from the forums on here i've mashed together bits and pieces to arrange dimensions (exclusive of angular) how we need for detailing (we don't really use chain or baseline and only ordinate sometimes). But lately I'm coming across an issue that I'd like to sort out.
current result
desired result
The 1st pic is showing what i get currently with the code I'm using, the 2nd pic is showing what I want to achieve.
please see below for code:-
''------- ' Set a reference to the active drawing document Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Get the collection of dimensions on the active sheet. Dim oDimensions As DrawingDimensions oDimensions = oDrawDoc.ActiveSheet.DrawingDimensions Dim oDrawDim As DrawingDimension ' Iterate over all dimensions in the drawing and ' center them if they are linear or angular. For Each oDrawDim In oDimensions If TypeOf oDrawDim Is LinearGeneralDimension Then End If Next ' Get a reference to the select set and clear it. Dim oSelectSet As SelectSet oSelectSet = oDrawDoc.SelectSet oSelectSet.Clear ' Add each dimension to the select set to select them. For Each oDrawDim In oDimensions If TypeOf oDrawDim Is LinearGeneralDimension Then oSelectSet.Select(oDrawDim) End If Next ' Get the CommandManager object. Dim oCommandMgr As CommandManager oCommandMgr = ThisApplication.CommandManager ' Get control definition for the arrange dimensions command. Dim oControlDef As ControlDefinition oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingArrangeDimensionsCmd") ' Execute the command. Call oControlDef.Execute
Not really well-versed in this yet, so any help would be appreciated
(apologies if this is in the wrong section or previously addressed)