Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive dimension using custom property 2

Status
Not open for further replies.

Molgan

Mechanical
Oct 15, 2002
25
Hi,

I know this has been up here before, but i can't figure out how i works.

I want to be able to specify a value linked to a dimension using custom property. My plan is then to control dimensions in several parts using task schedular thru custom property.

Thanks!
 
Replies continue below

Recommended for you

Assuming SW 2009, use an equation. Custom properties can be directly referenced in an equation by enclosing the name in quotes.

-handleman, CSWP (The new, easy test)
 
Ok, but how exactly do i do this? Lets assume I have a sketch called Sketch1, containing dimension D1.

What do i write in equation? And wath do I write in custom property?
 
First, create the custom property you want and put some numeric value in it. Then, create your dimension. Then create a new equation. While editing the equation, click the dimension you are interested in driving. This dimension should be on the left side of the "=" sign. Now type in the name of your custom property inside quotation marks. For example, if your custom property is called

MyCustomPropertyThatICantFigurOutHowToLinkIntoADaggumEquation

then you should type in

"MyCustomPropertyThatICantFigurOutHowToLinkIntoADaggumEquation"

Alternately, there should be a little "Down arrow" looking button at the bottom of the equation editing dialog. Click that button and hunt down the property you want.

-handleman, CSWP (The new, easy test)
 
Thanks! Can I blame on the late time of day where I am? :)

One more question thou... The parts won't rebuild using update in task scheduler after changing the value in custom property. Nor will them update using rebuild in assembly. Do I have to open them and rebuild them one at the time?
 
handleman,

That'sonehellofapropertyname!

Astarforyou! ;)

- - -Updraft
 
My guess is you will have to use one of the Super Ctrl-Q macros available. These will force-rebuild an assembly and all of its components to do a complete rebuild. One of those macros is:

Sub main()
Dim wait As Double
wait = Timer
Application.SldWorks.ActiveDoc.ForceRebuild3 (False)
MsgBox "Rebuild time: " & Timer - wait & "s"
End Sub

-handleman, CSWP (The new, easy test)
 
If you define your Value using Tools Equations first for instance CSWP test you can hit Add and type
A=50
B=100
C=150 etc.
make sure there are no empty lines or you'll get error

SolidWorks will automatically add "Quotes" around the Variables A, B, C

When you add a dimension in your sketch you can use the Link Value... function from the drop down shown to the right of the dimension value and link to the "A" variable which will show as $VAR: A

This is a more powerful method than using equations because any dimension linked to the A Value can be modified to change the variable.

This method of defining the Variable before linking a dimension allows the value to be modified from the Equations List or from any linked dimension.

Linked values can be created on-the-fly when modifying a dimension and the dimension name D# will be replaced by the Linked Value text. If D1@Sketch1 is right clicked and Link Value is selected the Variable you enter "DRAFT" will replace D1 so the dimension name is DRAFT@Sketch1

Entering the Link Value name after the dimension is created will show a link symbol next to an equation in the list and will prevent you from modifying the Equation.

If you set an equation D1@Sketch1 = "Draft" will only let the dimension be modified from the equations dialog. Or in another sketch you linked "D1@Sketch3" = "D1@Sketch1" you could only modify the Driving Dimension. With Linked values either dimension could be changed and both would update to the new value.

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor