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: 

Configurator

6 REPLIES 6
Reply
Message 1 of 7
wshaner
561 Views, 6 Replies

Configurator

I'm currently building a configurator in Inventor 2013 using a series of iParts and iAssemblies and I'm looking for a way to use either iLogic or VB.NET that would do the following.  After I make my selection in a form, the required models are suppressed or unsuppressed.  Normally if a particular model isn't found that meets the required criteria submitted from the form then an error is issued by inventor looking for this model.  I would like the error to be ignored and instead a list created with the name of the missing model (this would be a generic name).  Is there any way this can be done using iLogic or VB.NET?

 

Thank you

6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: wshaner

wshaner,

 

I have been building Configurators for three years now.

Instead of "Suppressing & Unsuppressing" your unneeded parts, have you tried making them invisible instead?

 

I would place all of my iParts and sub - iAssemblies into one (regular) assembly file and then make the parts that I don't need invisible. Then, when running a "Save out" routine, delete all of the invisible components.

 

You may not be able to use this workflow for whatever reason, It's just a suggestion.

So here is an answer to your question.

 

The rules that would directly access or control any components that may be missing (and showing your error), shouldn't be completing any other tasks, other than for example, suppressing or unsuppressing the necessary components.

 

Then, at the beginning of the rule place this code:

 

IfComponent.iComponentIsActive("Your iPart name")=FalseThenReturn

This snippet will check to see if the iPart or iAssembly is suppressed or unsuppressed (Active or Inactive), If the component is suppressed, the "Return" will exit the rule without running it. This should eliminate your error issue. Also, an "If" statement that is one line long and ends with a "Return" doesn't require an "End If".

 

If this solves your problem, please give Kudos and accept as solution, if not, give me some more information please.

 

Len

Message 3 of 7
tneff2
in reply to: wshaner

Have you thought of using the AssemblyComponentDefinition Object? If you're looking for more freedom to add components to your assembly this would be your best bet. It would allow you to bring in components as needed and constrain them as well. There are a bunch of examples in the API help.

 

I think there might be some more info on working with vb.net assemblies on the Mod the Machine blog.

 

- Thomas

Message 4 of 7
wshaner
in reply to: tneff2

Thank you for the responses and your anwers may be what I'm looking for, but I'm not sure because I'm too new to this.  Let me try to explain my situation in a different way.

 

Here is what I'm trying to do with my configurator.

Let's say I have 3 boxes, one is red, one is blue and one is green, these 3 boxes make up the assembly.
Now let's say as I fill out my configurator form I select a fourth box that is black.
This black box is not yet modeled and is not available in the assembly.

I want my assembly to be built with the other 3 boxes with no errors and a report generated stating the following:

Part Name                Description    Quantity
BOX 1                      Red               1
BOX2                       Blue              1
BOX3                       Green            1
BOX4-SHORTAGE    Black             1

 

This report can be in excel, a text file or HTML


Is there a way to accomplish this in iLogic or VB.NET

Thank you,

Bill

PDSP'13 (Inventor 2013)

Message 5 of 7
wshaner
in reply to: Anonymous

Thank you for the responses and your anwers may be what I'm looking for, but I'm not sure because I'm too new to this.  Let me try to explain my situation in a different way.

 

Here is what I'm trying to do with my configurator.

Let's say I have 3 boxes, one is red, one is blue and one is green, these 3 boxes make up the assembly.
Now let's say as I fill out my configurator form I select a fourth box that is black.
This black box is not yet modeled and is not available in the assembly.

I want my assembly to be built with the other 3 boxes with no errors and a report generated stating the following:

Part Name                Description    Quantity
BOX 1                      Red               1
BOX2                       Blue              1
BOX3                       Green            1
BOX4-SHORTAGE    Black             1

 

This report can be in excel, a text file or HTML


Is there a way to accomplish this in iLogic or VB.NET

Thank you,

Bill

PDSP'13 (Inventor 2013)

Message 6 of 7
wayne.brill
in reply to: wshaner

Hi Bill,

 

From your description I believe the Inventor API or iLogic could do this. The boxes will be either parts (ipt file) or sub assemblies. (iam files)  I would probably do a quick prototype using VBA. There are samples in the help file that could be edited to do what you need.

"C:\Program Files\Autodesk\Inventor 2014\Local Help\admapi_18_0.chm"

 

You could edit this example to determine if the "Black Box" is not in the assembly.

Public Sub AssemblyCount()

This sample shows how to recursively traverse an assembly and get the count of leaf node components and subassemblies.

This sample demonstrates placing an assembly occurrence.

Public Sub AddOccurrence()

 

 

Creating Excel files or text files can also be done using available API's. (not an Autodesk API but can be used running in your custom code that is running with Inventor).

 

 

 

 

Inventor ETO maybe of interest:

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=18361292

 

Also Configurator 360:

http://www.autodesk.com/products/autodesk-configurator-360/free-trial

 

 

Thanks,

Wayne

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 7 of 7
Anonymous
in reply to: wshaner

wshaner,

 

I think I must be missing something.

How can you add a black box to your assembly if it is not predetermined as an option to choose on the form?

If this is true and you do know what that offering would be (Black Box) and it is already modeled, just never used together with the other colored boxes, then you would add it and constrain it in your assembly and then make it invisible.


I would really need a more detailed understanding of what you are trying to accomplish. I will direct message you with my email addy.

 

Len

 

 

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

Post to forums  

Autodesk Design & Make Report