IF Statements in

  Рет қаралды 12,261

Learn Everything About Design

Learn Everything About Design

Күн бұрын

In this video we are going to take a look at the newly added IF statement logic in Fusion 360 parameters. This has been a long time coming and at a first glance is a bit tricky to use, so in this video we are going to look at 3 cases and walk through how to build out IF, Nested IF and logic based parameters.
If you want to follow along here is the dataset in the video.
a360.co/43DqfjY
And here is a link to the Fusion 360 help fil.
help.autodesk.com/view/fusion...

Пікірлер: 40
@timangus
@timangus Жыл бұрын
I think a more intuitive way of writing nested ifs for the purposes of ranges is to keep the operator sense the same for each conditional. e.g.: if( FlangeOD >= 6 in; 8; if( FlangeOD >= 5 in; 6; 4 )) That way the resultant values are always close to their respective condition and the last value is always the if-nothing-else-matches value. Much easier to read: if( FlangeOD >= 8 in; 10; if( FlangeOD >= 6 in; 8; if( FlangeOD >= 5 in; 6; if( FlangeOD >= 4 in; 4; 3 ))))
@jpjpJPJPG
@jpjpJPJPG Жыл бұрын
That's what my brain wanted to see, thank you for that.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Great point Tim! Something I overlooked making the video since my end goal wasn't really a functional part, but I 100% agree with you! Pinned the comment so others can see. thanks
@woodcraftloop
@woodcraftloop 9 ай бұрын
Yeah, the if statement can be written exactly like in a MS Excel. No need to bracket the nested if's.
@thePawelSroczynski
@thePawelSroczynski 10 ай бұрын
your video seems to be the only one on YT on conditionals in fusion right now. thanks! ;-)
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 10 ай бұрын
Glad to help!
@bwilliams1815
@bwilliams1815 Жыл бұрын
Truly awesome. I got frustarted with syntax errors in Creo for years. Did not use parameter charts. Will try again in Fusion. Thanks for the videos like always.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Glad it helped!
@hillfortherstudios2757
@hillfortherstudios2757 Жыл бұрын
I can tell this will take some practice and likely some further training. Thanks for this video!
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Yes it will, but worth it for sure. I have been using it on a few designs since it was released. Not perfect but great for configuring a design.
@michaellitzkow8123
@michaellitzkow8123 Жыл бұрын
Many of us have been waiting years for this! I used to shake my head and wonder - isn't this program created by programmers? How can they fail to understand that you need logic statements in parameters? Every time I saw my timeline populate with cascading errors and couldn't find a way around it because of this lack, I would just sigh - oh this again... It's too bad they have failed to include a "switch" or "case" statement for handling ranges. It would be soooo much nicer. Anyway, many thanks for introducing this great new feature.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
yup. There are some ways around it sort of (the switch/case example). min and max in conjunction with if/and/or maybe. but it does seem very odd that we just got If and i have been asking for years for it :)
@gabrielemastaglio4240
@gabrielemastaglio4240 7 ай бұрын
GRAZIE MILLE MI HAI AIUTATO TANTISSIMO. COMPLIMENTI PER IL TUTORIAL E BUONA VITA!
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 7 ай бұрын
Thank you! Glad it was helpful and you as well!
@Markevans36301
@Markevans36301 10 ай бұрын
Thank you so much for this! I knew you could do any of this if you wanted to get fancy shmancy and write a python script but I had no idea that I could do these things right from the parameters box. This could be a game changer as I progress. Sure would be nice to design a box once and then control its size and number of dividers etc. without writing a full program.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 10 ай бұрын
Agreed, it tool a long time for IF to make it into the parameters. This and the new addition of configurations (if you are on a commercial or edu license) really helps with the types of designs you are talking about.
@spiderpat21
@spiderpat21 11 ай бұрын
Here's a subject that will meet my expectations. Coming from a CAD/CAM practice for 38 years on Siemens NX (formerly MacDonald Douglass' Unigraphics), Siemens Solid Edge and SolidWorks before retiring. Siemens NX was my favorite software right from the introduction of freeforms, which could be combined with surface and modeling. This was a daily practice that I didn't even know existed in Fusion360. The sintaxis of the conditional is close to that in Siemens NX. What I also regret is the possibility of working with Excel files to retrieve variables and inject them into Fusion360.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 11 ай бұрын
Thanks for sharing! I used NX 3/4 back in probably 2006 time frame and i was a Solidworks user from 2008 to 2019. I had done a lot with design tables for configuring models, even VBA scripts in excel to control models as well as working with Driveworks. I know exactly what you mean on the spreadsheets. I wish that was in Fusion, even to the level it is in Inventor. There will be an update in September that I am hoping will bring some more functionality in this area. On the freeform model, NX being built for big industry had some great tools. Solid Edge not so much(for me). the freeform tools were somewhat of a joke sadly. For solidworks the add-in Power Surfacing was a great and I highly recommend it to anyone staying in the solidworks ecosystem. Their 3d Experience has SubD, but its not "there".
@gedr7664
@gedr7664 9 ай бұрын
there's an addon for that called sheeter - it uses google sheets
@r3dsign
@r3dsign Жыл бұрын
Its time to fusion add some nodes like grasshopper it would be amazing to get sliders and in full parametric design enviroment.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
That would be cool! There used to be something close called Dynamo(which is still around) and had a plugin for Fusion, but that was dropped a few years ago. dynamobim.org/download/ I haven't tried the Sandbox yet but if you google Dynamo Fusion 360 I am sure some old videos will surface.
@trunkerdixon
@trunkerdixon Жыл бұрын
Very helpful. T
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Glad it was helpful!
@evo-labs
@evo-labs Жыл бұрын
It's the year 2023 and we are celebrating a CAD tool adding ternary if statements to its parameters that should have been added years ago 🤣
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
lol sad but true.
@David_Best
@David_Best Жыл бұрын
Great, thanks for doing this. Now, you said you'd prefer to work this out in something like Excel first, so I'd like to see how you'd take IF/THEN/ELSE logic from an Excel worksheet and pull that directly into Fusion. I've been doing all this complicated conditional work in Excel having it create the output variables that I plug into Parameters in Fusion, but I'd rather have the logic in Fusion itself rather than in an adjunct Excel file. A classic case I work with is a Fusion model for a kitchen cabinet, where the number if drawers varies, and the relative height of each drawer face varies in proportion to the number of drawers.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Thanks David, that part may have been a little misleading because the formatting is a little different so its not just a copy paste method. I just meant to work out the logic. Excel does a lot of auto formatting in the logic so you can get away with doing IF(A1=1,TRUE,FALSE) where Fusion needs numbers and not strings for example. but it can help plan how you want to approach it, then transpose the logic. In solidworks I would do this directly in excel in a design table as that was very easy and popped up directly in SWx and would even make use of vba buttons and dialogs. I'll think about a more elaborate example like your kitchen cabinet and see about the logic layout and how I would do that and let you know.
@David_Best
@David_Best Жыл бұрын
@@LearnEverythingAboutDesign Actually, after I made the suggestion to you, I was able to make my own spreadsheet in Excel that has all the complex IF/THEN parameter formulas for a cabinet design model with variable drawer counts/heights, then save that as a CSV file and import it directly into Fusion using the Parameters I/O extension. It took a while to automatically deal with syntax differences, but it works great. Thanks for the inspiration.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
@@David_Best That is awesome to hear! But you were able to somehow automatically deal with the If syntax differences like , in Excel vs ; in Fusion?
@David_Best
@David_Best Жыл бұрын
@@LearnEverythingAboutDesign Yes, there are text manipulation functions that will do just that and extract an Excel formula into a text string. It’s not something I would suggest for the average Excel jockey, but it could be turned into a canned Macro that anyone could use. I’ll be working toward that later this week.
@spiderpat21
@spiderpat21 11 ай бұрын
Hello David, Which plugin do you use to transfer output variables to Fusion? Or is it a manual injection...
@larrybud
@larrybud Жыл бұрын
Now if they could only retain the sort option in the parameters... e.g. click on the "name" header to sort by name. Close the parameters, open them back up, and they are no longer sorted.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign Жыл бұрын
Yeah, or let you keep the dialog open on another screen and keep working. I will mention the sorting thing next time I talk to a developer.
@geranna3654
@geranna3654 4 ай бұрын
RE: Logic Parameters I use Notepad ++, for writing my VBA (Fusion looks similar other than semicolons replace commas) as it helps highlight for correct bracketing, eg: IF(condition1; A, IF(condition2; B, IF(condition3, C, D))) Does Fusion accept Copy/Paste code with 'Line-breaks' ? Also can 'AND' 'OR' Logic combinations be used ?
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 4 ай бұрын
Fusion parameters are still a bit limited (as are most CAD programs). Here is the reference of what you can do in parameters in fusion. help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20 If, AND, OR, and NOT were added at the same time so yup you can use those logic functions. As for copy/paste code, no not really. There is a free app from the autodesk app store called Parameter IO that lets you pull in CSV data into parameters. apps.autodesk.com/FUSION/en/Detail/Index?id=1801418194626000805&os=Win64&appLang=en I also have a few videos on how to program a script in fusion in the API series that deals with creating, setting, and updating parameters with python.
@dellsdiy
@dellsdiy 7 күн бұрын
Is it possible to use an if statement to add a new component to a model if the condition is met. For example, if the span between two posts is greater than 3ft then insert a support beam every 20 inches(which is different than the two end posts) between the two end posts. I know theres multiple things going on here and we need to configure the pattern function to understand this but all of the videos i've seen so far is to add the same part (a hole, a fence picket, a shelf) if there is already that part in a model.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 7 күн бұрын
Not exactly. You might be able to get something going with Configurations in an assembly. With configurations you can suppress a feature/component which you can't really do with the parameters/if statements. You can use parameters in a configuration so you could have an if statement that the result is a 0 or 1. For example if Span > 36in then 1, else, 0. Then your configure features would look for the 0 or 1 and decide to suppress the feature for the support across the span.
@dellsdiy
@dellsdiy 7 күн бұрын
@@LearnEverythingAboutDesign now youve got me thinking. Configurations might actually work, will just need to figure out the spacing of the new components
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 7 күн бұрын
@@dellsdiy I did a short series on configs kzbin.info/aero/PLBDfGh8A8kXXmBat7iDTFTU3VyFwTy9tB
How To Model An IsoGrid in Fusion 360 | Parameter Based IsoGrid Tutorial | #fusion360
21:24
Learn Everything About Design
Рет қаралды 19 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 19 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 9 МЛН
Automated CAM without AI - Fusion 360 Container Templates in 2024
40:02
Fusion 360 - Organize your files using Derive
7:20
Mechanical Advantage
Рет қаралды 9 М.
Fusion 360 | Slots around holes
7:09
Fusion 360 School
Рет қаралды 53 М.
Fusion 360 Configurations - we've been waiting for this
10:50
Portland CNC
Рет қаралды 4,7 М.
Midpoint Constraint Top Tips in Autodesk Fusion
5:23
Autodesk Fusion
Рет қаралды 10 М.
OPTIONS with Configurations for Fusion 360 - NEW FEATURE TUTORIAL!
12:58
The Fusion Essentials
Рет қаралды 2,9 М.
Что она делает?
0:34
Почему?
Рет қаралды 11 МЛН
Amazing! Taiwanese Giant Watermelon Juice - Fruit Cutting Skills
0:47
Foodie Camp 푸디캠프
Рет қаралды 55 МЛН
Жду в тг: @kedrovaalyona
0:59
Кедрова Алёна
Рет қаралды 2,4 МЛН
Первый Холодец Китаянки
0:51
Petya English
Рет қаралды 6 МЛН
When Brother Refuses to Listen #shorts #funny #fypシ゚viral
0:19
Javi’s Family Adventures
Рет қаралды 11 МЛН