AnsweredAssumed Answered

Aligning Dimensions

Question asked by Trevor Wunn on Sep 15, 2014
Latest reply on Sep 16, 2014 by Trevor Wunn

Good Morning Everyone,


I am having an issue with a macro I am trying to make that aligns a dimension left or right(it is only set up for right currently for testing purposes). My boolean variable is returning true but the dimension location isn't changing. Any help would be much appreciated.


Here is the code. It is supposed to work when you already have a dimension selected.


Option Explicit

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swModelDocExt As SldWorks.ModelDocExtension

Dim boolstatus As Boolean


Sub main()



Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swModelDocExt = swModel.Extension


boolstatus = swModelDocExt.AlignDimensions(7, 0.001)


End Sub