Dimensions of the room

Hello

In your code snippet, you define swDim as the "D2" dimension of the "Sketch1" sketch of the "part1" part of the "assembly" assembly but then you don't do anything with this dimension: what's the point?

GetSelectedObject6 allows you to retrieve what is selected in SW: have you selected a dimension in SW? otherwise this snippet of code is useless too, and the empty result would tend to show that no dimension is selected in SW.

Look at this example, it should allow you to see how to do it.

Kind regards