I need help creating Stocksize (dimensions) on custom property SW2017,
Usually I manage to find a macro for DIMENSIONS, the problem is that I see the dimensions on anglet property of the file after clicking on MACRO, and not on custom property.
Thank you for your help.
Hello
It's normal, with the lines:
Set swCustProp = Part.Extension.CustomPropertyManager("")
retval = Part.DeleteCustomInfo2("", "StockSize") 'Remove existing properties
swCustProp.Add3 "Stocksize", swCustomInfoText, StockSize, 1 'Add latest values
You only add your "Stocksize" property in the customize tab, you also have to add it in the other tabs using the " GetConfigurationNames " function that you can find here. You will find an example to list the configurations here.
Kind regards
3 Likes
Thank you D.roger, I found this macro on this forum I don't know how modified,
can you explain to me with photos if possible
Hello
Don't know the VBA language?
Kind regards
Hello
In this case, it will not be easy!!
Before starting to make macros it would be good to train a little on the VBA language, so I'll give you the same answer I already gave you previously on another discussion:
" Before thinking about VBA Solidworks I think that you should already be interested in the programming language itself in order to understand how it works, there are a whole bunch of courses that can already help to get started such as HERE or HERE, yes it's for Excel but it doesn't matter the philosophy is the same: object-oriented programming. Then and only then can you be interested in the Solidworks-specific APIs on the online help directly here. "
Now you are asking us to make a specific development for you, which, for me, is not the purpose of the forum, your Solidworks reseller can just as well do it for you.
Kind regards
3 Likes
There is the visualization cube function that could perhaps provide the requested data without going through a macro.
An effort on spelling/grammar would be appreciated. It is simple to write the answer on a word processor, run a spelling/grammar check and then paste the corrected answer into the forum.
4 Likes
Hello d.roger
As I mentioned on the ad the macro it is not me who developed, I downloaded from this forum, thank you for your effort,
Have a good weekend.