Using API I was able to fillet all the segments of a sketch, passing a custom property as radius.
This way only the numeric value I read from the custom property is passed and both the sketch dimension and the custom property remain independent, but what about linking them together?
Is it possible to link a dimension and a custom property e.g. during the fillet creation in the sketch?
what is the correct way to do it?
link sketch dimension with custom property
Re: link sketch dimension with custom property
Create a variable with some value. Now link the custom property and fillet values to that variable.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: link sketch dimension with custom property
the sketch could be randomly deleted and recreated multiple times during the design phase.
Is it possible to name the fillet dimension the same way every time and keep the link?
Is it possible to name the fillet dimension the same way every time and keep the link?
Re: link sketch dimension with custom property
The complete dimension name in a sketch is dim name @ Sketch name. So you will have to rename both the sketch, and fillet dimension.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: link sketch dimension with custom property
@gupta9665 thank you for the hint.
the sketch name does not change.
it is edited, segments wiped and replaced only, so I have its name under control.
how do I get the sketch fillet dimension after its creation?
I suppose I need and equation to link fillet dimension and the file property.
I tried to look for an example, but I cannot find what parmeters to pass and what API use.
If I have a "radius" property how do I equate with the sketch dImension?
in the UI it would be something like
"D1@sketch1"="radius"
is it the same for api as well?
the sketch name does not change.
it is edited, segments wiped and replaced only, so I have its name under control.
how do I get the sketch fillet dimension after its creation?
I suppose I need and equation to link fillet dimension and the file property.
I tried to look for an example, but I cannot find what parmeters to pass and what API use.
If I have a "radius" property how do I equate with the sketch dImension?
in the UI it would be something like
"D1@sketch1"="radius"
is it the same for api as well?
Re: link sketch dimension with custom property
I read your post of the 3DSYM forums as well. ANd here is what I replied
You need to get the fillet dimension name after it has been created. And then link it with the property name and not it's value. So you will have to actually create an equation using the API.
Here is the line of code you may need
Part.GetEquationMgr.Add2 0, """D1@Sketch1"" = ""Radius""", True
You need to get the fillet dimension name after it has been created. And then link it with the property name and not it's value. So you will have to actually create an equation using the API.
Here is the line of code you may need
Part.GetEquationMgr.Add2 0, """D1@Sketch1"" = ""Radius""", True
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger