Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Sketcher relations Syntax

braynpower

New member
G'day all,

Does anyone have any know-how they'd be willing to impart with in terms of using the IF function in Sketcher?

I have a line that has its base dictated by a relation, and its angle dictated by another relation. The problem arises when in certain instances, the angular constraint creates a zero length line (or negative length...), or sometimes the base relation does the same. This line is used to create a surface that is then merged and has all manner of other torture committed afterwards... so when it fails, well lets just say its a bit of a PITA.

I'm thinking I might be able to rig something with the IF function, and then failing that, I could try work out a way of getting Pro/Program to choose a surface/merge instead...

If anyone could help with providing basic syntax like "IF (FeatID:XXX <=1, THEN...)" for the minute I have no idea even how to write it, and unless I'm mistaken, there isn't a simple write up of the options anywhere...

And if someone has a really smart way of doing this that means I don't need to do any of this.. well that'd be cool too...

I've attached some super clear sketch goodness...

Cheers!

Bryan.
 

Attachments

  • 1mm.JPG
    1mm.JPG
    43.7 KB · Views: 20
so, seems the syntax is pretty similar to excel


sd0 = if(TEST <> 6, 5, 10)

TEST is naturally a parameter
<> means is not equal (if you've played around with Pro/Program you'll know this)

so if TEST = 7, sd0 will be 5
if TEST = 6, sd0 will be 10

so the fun is then playing around with this in incremental pattern updating memb_i etc...

I have yet to try any of the other functions, but I might have a hack at it soon.
 
Just and FYI on using sketch relations, these can frequently require a second regen to fully update. Sometimes you have to use them but most of the time you can make part relations that will not require the second regen.
 

Sponsor

Articles From 3DCAD World

Back
Top