handleman
Automotive
- Jan 7, 2005
- 3,411
This has been asked for in the past. It is now possible.
-handleman, CSWP (The new, easy test)
SolidWorks forums said:Attached is a file with some sketch text in Sketch2. This text is linked to the thickness of the part. You can link the sketch text to anything you can get into the custom property. If you're into API and the weird fringe of SW, you can dig into how it works. Otherwise, you can use this file as a sort of template as long as you only need to control one sketch text entity. There are four important things in it. You can delete anything else.
1. The custom property called "NameOfSketchWithText". Its value should be the name of the sketch that contains only one Sketch Text entity. The sketch can contain any other geometry, construction geometry, etc. If you put your text in a sketch that is not called "Sketch2", modify this custom property value to match.
2. The custom property called "Text4Sketch". Whatever text it contains will go to the Sketch Text entity in the Sketch named above.
3. The custom property called "code". This is where the magic is. Peek behind the curtain if you must.
4. The equation "Dummy" = "code".
Note: this is lunatic fringe, unsupported, undocumented behavior. I tried to make it config-specific, but it crashed SW. It seems pretty stable with a single configuration though. Enjoy!
-------------------------
I'll get you Eh Steve, if it's the last thing I dooooo!
-handleman, CSWP (The new, easy test)