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: 

Automated part addition to assembly from content center

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
tbillsKGJL5
187 Views, 2 Replies

Automated part addition to assembly from content center

I'm trying to make a template assembly for Sheet Metal Shim Packs used in Bolted Connections.

 

Our Custom sheet metal components, by company SOP, are created from our Content Center.

I have the user describe the dimensions of the full shim pack & a rule uses some case statements to pick the row in the sheet metal table that contains the most appropriate gauge thickness for the shim in question, then assemble them all.

 

When using the Components.AddCustomContentCenterPart() command, I specify the custom parameters by which to call the row I need for each shim, but the error I get back simply says, "The Parameter is Incorrect."

The error makes reference to the AddCustomContentCenterPart command's line, instead of the line on which the incorrect parameter sits, so I don't know what to correct.

 

I'm including the snippet below:

 

Components.AddCustomContentCenterPart(
    "ThickShim:1", 'Component Name
    "Steel:Plate - Bars", 'Content Center Path of Desired Part Family
    "Sheet and Plate (Imperial)", 'Family of Desired part
    {"THICKNESS"    'CC Column set up to index rows by Decimal inch thicknesses' , Number_Thick 'Variable of Type DOUBLE pre-calculated to select the desired row. If removed, much more serious errors occur.' },      {"WIDTH", Pack_Width, "G_L", Pack_Length}, 'Custom parameters used to control sizing of the shims
    position := Nothing, grounded := False, visible := True, appearance := Nothing) 'I don't yet fully understand how these work, but I know that if I remove them, the errors get worse.

 

Any input is bound to be helpful!

2 REPLIES 2
Message 2 of 3
A.Acheson
in reply to: tbillsKGJL5

Hi @tbillsKGJL5 

Here is the link to ilogic API help for Components.AddContentCenterPart. 

 

Sometimes it helps to see a sample and more descriptions to the object use.

 

What I like to do to see how these work is to use the capture tool in ilogic editor. Right click the occurrence and right click add. This will give you an exact code snippet. Then you can compare your version to see the difference. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 3
tbillsKGJL5
in reply to: A.Acheson

I understand now how the row index entries have been mapped, and which ones are actually important. This is a very neat tip; I'll be sure to remember it!

 

It Turns out that the WIDTH and G_L are explicitly defined as strings in the table, not custom values available for entry.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report