Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sort' new to iLogic... need help with MultiValue.SetList and parameter checking

6 REPLIES 6
Reply
Message 1 of 7
leonardbordian
473 Views, 6 Replies

sort' new to iLogic... need help with MultiValue.SetList and parameter checking

hi all! i'm kinda' new with iLogic but not Inventor (been using INV since R1)

 

please bear with me and i will try to explain what i'm trying to do here.

 

i am creating an iLogic assembly that uses alot of 'static' values. although the sizes may change, the parameter names are the same in all of them. so i decided to create a 'rule' that stores all the values using the SELECT CASE "value", CASE "value_name". so my PARAMETER is a MULTI-VALUE LIST. this works great 🙂

 

but i have over 60+ assemblies. so i created another 'rule' to filter my selection down. so i created 3 more PARAMETERs, that are MULTI-VALUE LISTs, which inside the 'rule' gets PUT TOGETHER to match the VALUE from my first rule. okay, this works well also.

 

so i created a FORM, that the user can use to build the assembly with simple PULL-DOWN menu choices. so far, from start to finish, i have achieved what i wanted to do (for my stage one of this program). but if the user decides to change his mind and goes 'backwards', the 'rule' fails.

 

if you're still with me, that's great!!

 

so my question is, how can i check the paramater value that is generated in my FORM, with the values that i set up in my first MULTI-VALUE LIST match?

 

i hope that made sense LOL

 

thanks

6 REPLIES 6
Message 2 of 7
dkatz
in reply to: leonardbordian

I've done something kind of similar by having the list of values be an external thing (text file, excel spreadsheet, etc), and then the multivalue list gets pulled in to the inventor file from that external list, so the verification is unneccesary (Because the external list of values is always the same). Or you can use the external list to verify the list in inventor, if that's how you want to structure it.

 

Hope that made sense, and more importantly, helps,

Dave

Message 3 of 7
leonardbordian
in reply to: dkatz

thanks for replying 🙂

 

i actually got my code sorted out 🙂

 

after doing some more research, it turns out my code was okay but my lack of experience with iLogic was the problem. turns out that the format that i had written was incorrect. once i formatted correctly, it was smooth sailing from there.

 

i had thought about using Excel and having an external file but i've use INV for so long, and it has been my experience that Excel and INV do not play well together, so i avoided going down that path.

 

i need this verification b/c i have 60+ assemblies and if the user changes his choice, the code fails. so i also created some error checking and verification rules to do what i needed to do.

 

the one thing i've noticed now with my code, is that if the user changes his selection, my assembly model doesn't always update. so i'm a little stuck on that one for now.

 

thanks again for replying 🙂

Message 4 of 7
dkatz
in reply to: leonardbordian

Glad you got it worked out.

 

I agree. Excel and Inventor do not play nice for some reason (Especially when it involves iParts). I ended up writing my own excel lookup function in iLogic because of that. It's slightly more cumbersome, but if it errors, it at least attempts to tell you what happened and where it happened. I need to post that up on the web for others to use. It seems more stable, and somehow runs faster than the GoExcel functions. I am not a programming whiz, so I have no idea why. I'll reply once I make a post, if you're ever interested in going down that road.

Message 5 of 7
leonardbordian
in reply to: dkatz

great! i'd like to see how you've done things. this is my 2nd attempt at iLogic but so far, so good.

Message 6 of 7
dkatz
in reply to: leonardbordian

https://reinventinginventor.wordpress.com/2014/11/24/re-writing-the-goexcel-functions-for-use-in-ilo...

 

I wrote something up. I need to figure out how to format code, but I hope it gets the point across as to possibilities

Message 7 of 7
leonardbordian
in reply to: dkatz

hey!

 

thanks for posting this! i'll have a look at it

 

thanks again

 

-leonard

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report