Page 1 of 1

link sketch dimension with custom property

Posted: Mon Jan 22, 2024 8:10 am
by mp3-250
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?

Re: link sketch dimension with custom property

Posted: Mon Jan 22, 2024 12:14 pm
by gupta9665
Create a variable with some value. Now link the custom property and fillet values to that variable.

Re: link sketch dimension with custom property

Posted: Mon Jan 22, 2024 4:29 pm
by mp3-250
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?

Re: link sketch dimension with custom property

Posted: Tue Jan 23, 2024 3:20 am
by gupta9665
mp3-250 wrote: Mon Jan 22, 2024 4:29 pm 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?
The complete dimension name in a sketch is dim name @ Sketch name. So you will have to rename both the sketch, and fillet dimension.

Re: link sketch dimension with custom property

Posted: Tue Jan 23, 2024 4:45 am
by mp3-250
@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?

Re: link sketch dimension with custom property

Posted: Tue Jan 23, 2024 11:11 am
by gupta9665
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