Using SW version 17.
Trying to dimension across a centerline which should turn the dimension into a diameter. If you have manually smart dimensioned this way prior to running the macro, it works perfect…..BUT…..if you run the macro first thing after opening solidworks, or before manually smart dimensioning across the centerline, you get a radius, even though the dimension is placed on the opposite side of the centerline via the macro. It’s almost as if the first time you manually use smart dimension, it initializes some unknown variable that tells solidworks that it is in “diameter mode”.
- Open a fresh instance of solidworks and open the attached part file.
- Run the Centerline_Example.swp macro (attached) immediately after opening. When I run this, I get the below:
- Manually use smart dimension to create the diameter dimension across the centerline
- Delete the manually created dimension
- Run the Centerline_Example.swp macro
- Results in the correct Ø2.0 diameter and will continue to result in a diameter dimension until you shut down solidworks and restart again.
Obviously the workaround is to open solidworks, manually dimensions across a centerline, but is there a way to avoid this?
Thank you all in advance.