Hello, I'm new at API development for SolidWorks and I learning by doing it. I'm modeling an assembly that has multiple combinations of parts, varying according to its length. I'm already know how to vary the position os the sub-part in assembly according to the length of the main part, but I don't know how to make a sub-part disappear of the assembly. Example: if my main part has 1500 mm of length, it should have 4 supports welded at it, but, if it has 2000 mm, should have 5 supports, and if had 3000 mm (the maximum), will be 6 supports welded in it.
At first, I'd thought to make various assemblies with differents numbers os supports in it and when the length defined was >= than the length of the combination, the macro calls a correct assembly. But, first, I don't know yet how to use an "if - else" on it, so I should learn it. Does this way is a good way to solve this task? How to make the assembly vary according to its length without the need of multiplies assemblies? I'm very begging at programming, so I don't even know where to find more information. I'm doing everything by watching YouTube videos and use the command of record the steps to create a macro at SolidWorks. Every help is welcome.