Select Dimension with Property Manager Page

I'm building a macro for linking dims to a custom property (in a PART).

I have a problem. When bringing a Property Manager Page up for this, Instant 3D-button (from SW) greys out and I'm not able to select dims from a model.

This code is still far from final but can you guide me? What is wrong? Why it is not possible to "activate" model with Instant 3D and select dims?

There are another selection boxes for a plane and a body and these works just fine. I have copied most of this code from a macro:

' Mirror part by Boinon Stéphane
' Nov 26, 2007 5:33 PM  in response to: Roland Schwarz
' https://forum.solidworks.com/message/41028#41028

SolidworksApi macros
Answers 2
SF
SF 2010-05-04 Best Answer

Have not found a solution for this. I guess this is not possible for some reason. It would have been so good way to do this ...

I'm looking another way now. Has anyone already done this kind of macro (linking dims to a custom property)?

I have not yet worked with selecting dims with a mouse so it would be most helpful to get some example to study.

SF
SF 2010-05-04

Linking a dimension to a custom property value is core SolidWorks functionality last I checked.

Go to File - Properties and with the custom properties dialog open and the property in question selected just click the dimesion in the model view window and the custom property resolved value is now tied to the dimension value (it will change as dimension changes).