×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Drive dimension using custom property
2

Drive dimension using custom property

Drive dimension using custom property

(OP)
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!

RE: Drive dimension using custom property

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)

RE: Drive dimension using custom property

(OP)
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?

RE: Drive dimension using 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)

RE: Drive dimension using custom property

(OP)
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?

RE: Drive dimension using custom property

handleman,

That'sonehellofapropertyname!

Astarforyou!  ;)

- - -Updraft

RE: Drive dimension using custom property

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)

RE: Drive dimension using custom property

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources