How to create product variants

How to create product variants

Anonymous
Not applicable
1,038 Views
8 Replies
Message 1 of 9

How to create product variants

Anonymous
Not applicable

Hi,
I need to make a configurator with the fact that I have 8 types of product assembly and its variants are field controlled. I would have a drop-down list with individual variant names in the list, and the report would change accordingly. I'm trying to find a way to write code, but unsuccessfully. Please anyone have a solution.
Thank you

0 Likes
1,039 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable

Ipart and Iassembly?

0 Likes
Message 3 of 9

Anonymous
Not applicable

Assembly. See. picture

0 Likes
Message 4 of 9

Anonymous
Not applicable

I found one rule, but it can only work with one field.
How do I have to adjust it so that not all the fields I need work.
Rule:

 

Dim oAssyDoc As AssemblyDocument = ThisDoc.Document

        Dim AssyCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinition

        Dim compPattern As RectangularOccurrencePattern = AssyCompDef.OccurrencePatterns(1)
		
		compPattern.ColumnCount.Value = počet_0  

 

Thanks

0 Likes
Message 5 of 9

Anonymous
Not applicable

Maybe you need something like this? 

 

Placing ilogic components

 

https://www.youtube.com/watch?v=p7trTFZKTDg&ab_channel=itsaCADworld

0 Likes
Message 6 of 9

A.Acheson
Mentor
Mentor

@Anonymous 

 It looks like your building a frame. What is your desired workflow?

•Have you all ready the variants created?

•Can you list examples of the variants?

•Are you placing individual components?

•Are you controlling the assembly with  a master sketch?

•What is changing in the assemblies?

 

An approach I have used is in the past is to build an ipart /iassembly to get the configurations complete  then convert to ilogic afterwards working backwards from a working model. You can capture the snippets and learn some of the basics from there.

 

Capturing ilogic Snippets

https://forums.autodesk.com/t5/inventor-ideas/ilogic-content-center-change-size-snippet/idi-p/6835631

 

Hope this helps

Alan

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 7 of 9

Anonymous
Not applicable

Good day,
the product shown in the figure is a base marked G1. Furthermore, we will modify the product with the designation 1.5G, 2G, 2.5G up to 5G.
I made a video that shows how the report will grow.
My idea is that there will be a list of these modifications in the macro and the designer will just switch it.

Video link: https://www.youtube.com/watch?v=8XIcOdK2Ig0
It would help me a lot if I had a sample report with this rule, and thanks to that I would understand how it works.

Thanks

 

Martin

martin.depta@moris.cz

0 Likes
Message 8 of 9

A.Acheson
Mentor
Mentor

@Anonymous 

Here is two parts, both are using the fact that the components have been all ready placed in the assembly.

Factory method where an iAssembly is used to create the variants. The down side is that you need to generate the member each time you make a change which means extra file management and it may not be as flexible as you need. It is good to get the configurator functioning before doing the logic. 

 

iLogic method; is quite simple.This uses the parameters displayed in a form, no real coding apart from the if statements to change the pattern qty relative to the designation. Add as many patterns as you need. 

 

I hope this will start you in the right direction.

Alan

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 9 of 9

Anonymous
Not applicable

Good day,
thank you so much for your help. Now I understand where I made a mistake.

0 Likes