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: 

ILogic Component not found

6 REPLIES 6
Reply
Message 1 of 7
AMarshallCSF
1650 Views, 6 Replies

ILogic Component not found

I'm trying to play around with iLogic for creating dynamically dimensioned subassemblies.

I've created my dimensioning rules that link to the parts I wish to change dimensions on.

 

Parameter("Bridge Spine:1", "BridgeLength")=Length

And I've tested this in the SubAssembly I've created and all appears fine

 

However when I go to insert the sub assembly into the main assembly I get the following error:

 

Parameter:  The component named "Bridge Spine:1" was not found.

 

I've noticed that the new sub assumbly has created new parts with the extension -01 on the end of each part (As expected) It appears that this link is being lost in the rule for the new sub assembly. i.e the rule is looking for Bridge Spine:1 instead of Bridge Spine-01:1

 

What am I doing wrong and how do I fix this? It seems like this is something really basic but it's been driving me nuts trying to figure it out.

6 REPLIES 6
Message 2 of 7

Working in multilevel assemblies you have at least two options.

1) Consider MakePath command

Parameter(MakePath("RobotBaseJoiner:1", "Bridge Spine:1"), "BridgeLength") = Length

This allows addressing parameters in subcomponents.

  

2) call the rule in the subassembly by its name.  This rule should know how to update its components:

iLogicVb.RunRule("SubAssy:1", "UpdateParameters")

 

Use InventorVb.DocumentUpdate() to update top assembly.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 7

Thanks Vladmir for your response.

 

Turns out I was missing the basics. I wasn't aware I had to rename the model names to allow the name to dynamically pass into a new assembly. This isn't very obvious and I couldn't find it in any of the help docs.

 

Now that I've got my model inserting into the new assembly with all necessary dimensions adjustable.

Is there a way to control the naming of the new parts?

 

i.e. instead of:

PartA-01.ipt

PartA-02.ipt

 

Can I control it to insert:

 

abc-PartA.ipt

xyz-PartA.ipt

 

Message 4 of 7

This is the known naming problem described in iLogic wiki-help as stabilizing the names.

Look for the section  “Preparing an assembly for use as an iLogic Component”:

Suppose you are developing a subassembly that you want to place as an iLogic component. Often, the subassembly contains iLogic rules that reference component names. Normally, when you place the component, the part names are modified as part of the copy operation. To prevent this modification, change the component names manually beforehand. The part names then remain the same during the copy operation. This is called “stabilizing” the names. 

For example, change the component names to different names, and then change them back to the original.

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 7
Baishihu
in reply to: Vladimir.Ananyev

I have exactly the same problem. After read the whole messages, I still could not fix it. Could both of you please give me more details, for example, the whole iLogic rule? I don't know iLogic much.

 

Best Regards,

Message 6 of 7
Baishihu
in reply to: Baishihu

Thank you guys, I have fixed the problems after search and study more on the Internet. I appreciated the messages both of you posted here. Regards
Message 7 of 7

I have no clue how above options work, but I always give an extra iproperty to my models named:

SkipBrowserRename. Make it a ''yes/no'' function and put it on yes.

 

In this case the name will not change and the function will contineu to work.

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

Post to forums  

Autodesk Design & Make Report