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: 

Error when suppressing component pattern

3 REPLIES 3
Reply
Message 1 of 4
mat_hijs
192 Views, 3 Replies

Error when suppressing component pattern

I'm working on a configurable assembly that has 2 sheet metal parts in it that are connected with some screws. The parts have patterns for the holes. I constrained the screws to the first hole and patterned them to follow the pattern within one of the sheet metal parts. Now I want to be able to remove the holes and screws from a specific side by using iLogic.

I'm able to suppress the feature within the sheet metal part, and I also suppressed the constraint of the screw because the hole won't exist anymore. I also tried to suppress the component pattern but this still gives me an error. (Probably because it's looking for the feature pattern in the sheet metal part which is suppressed.)

Is there a way around this?

3 REPLIES 3
Message 2 of 4
JelteDeJong
in reply to: mat_hijs

Without any code, it is hard to tell what is going on. If possible share a snippet of code that is failing. But as a first thought did you check that you first suppress the pattern of screws and then the screw occurs in the assembly and as last the pattern in the sheet metal part.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 4
mat_hijs
in reply to: JelteDeJong

The code itself doesn't give an error, but the model does after running it. I tried simplifying my case as much as possible to show this example. Here's the code that's in my assembly, first suppressing the component pattern and the constraints and then transferring the parameter to the component. In the component, in the properties of the features of both the hole and the pattern I made it suppress if "Diameter" equals 0. I also attached my assembly that I simplified so there's as little ballast as possible. To recreate my issue just change the assembly parameter "Diameter" to 0.

 

If Diameter = 0 Then
	Component.IsActive("Screws") = False
	Constraint.IsActive("Constraint_Screw") = False
Else
	Component.IsActive("Screws") = True
	Constraint.IsActive("Constraint_Screw") = True
End If

' Transfer the Parameter to the Component
Parameter("Cassette", "Diameter") = Diameter

' Update the Document
InventorVb.DocumentUpdate()

 

Message 4 of 4
mat_hijs
in reply to: JelteDeJong

@JelteDeJong Have you been able to find the time to see what's going on yet? This little thing could make or break the workflow that I wanted to use as I don't want models that have errors in them even though the geometry is correct.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report