Тёмный

IF Statements in  

Learn Everything About Design
Подписаться 43 тыс.
Просмотров 13 тыс.
50% 1

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...

Хобби

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@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 10 месяцев назад
Yeah, the if statement can be written exactly like in a MS Excel. No need to bracket the nested if's.
@thePawelSroczynski
@thePawelSroczynski 11 месяцев назад
your video seems to be the only one on YT on conditionals in fusion right now. thanks! ;-)
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 11 месяцев назад
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!
@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 :)
@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.
@gabrielemastaglio4240
@gabrielemastaglio4240 8 месяцев назад
GRAZIE MILLE MI HAI AIUTATO TANTISSIMO. COMPLIMENTI PER IL TUTORIAL E BUONA VITA!
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 8 месяцев назад
Thank you! Glad it was helpful and you as well!
@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.
@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.
@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!
@spiderpat21
@spiderpat21 Год назад
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 Год назад
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
@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.
@whynotanyting
@whynotanyting 9 дней назад
Was pulling my hair (not literally) trying to find something like this in Fusion until it came to me to look for conditional parameters. I swear finding features is half the battle.
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 8 дней назад
Yeah this was missing for a long time. The help menu references are tricky to find. I think i have a link to the help file in this video.
@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 Год назад
Hello David, Which plugin do you use to transfer output variables to Fusion? Or is it a manual injection...
@geranna3654
@geranna3654 5 месяцев назад
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 5 месяцев назад
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 19 дней назад
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 19 дней назад
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 19 дней назад
@@LearnEverythingAboutDesign now youve got me thinking. Configurations might actually work, will just need to figure out the spacing of the new components
@LearnEverythingAboutDesign
@LearnEverythingAboutDesign 19 дней назад
@@dellsdiy I did a short series on configs ru-vid.com/group/PLBDfGh8A8kXXmBat7iDTFTU3VyFwTy9tB
Далее
Schoolboy - Часть 2
00:12
Просмотров 4,5 млн
БАТЯ И СОСЕД😂#shorts
00:59
Просмотров 2,2 млн
Fusion 360 - Organize your files using Derive
7:20
Просмотров 9 тыс.
Fusion 360 - 23 Tips Beginners Must Learn
15:45
Просмотров 203 тыс.
dog jumping in pool #funnyanimals #comedy #funny
0:21
Amazing tools #shorts
0:35
Просмотров 10 млн