Ilogic to Change size on Content Center Components

Ilogic to Change size on Content Center Components

Anonymous
Not applicable
8,542 Views
25 Replies
Message 1 of 26

Ilogic to Change size on Content Center Components

Anonymous
Not applicable

Good afternoon all,

I have a bit of a challenge I'm trying to solve.

I have a pipe assembly that has a few Ebows and Tee's in it. I need to change the size of some of the Elbows and Tee's and have been looking for a way to reach into the content center and change specific parts within my assembly.

I have given the parts to be changed a specific name in the browser but am unable to get much further from there.

Has anyone tried this? And better yet, any success?

If anyone could share a little insight with me I'd appreciate it.

Thanks,

Jeff

 

IV2014 SP2

Accepted solutions (3)
8,543 Views
25 Replies
Replies (25)
Message 21 of 26

Jef_E
Collaborator
Collaborator

Well, I think it might be possible to create a function that works for ALL of the content center parts to change the size as custom IF it's possible to access this screen via the API. This would even allow the user parameters to have a different name than the table column..

 

Example:

 

For each [item in table columns] In [Table columns]

   If [Template Parameter] = "" Then
      Continue Next
   ElseIf ...

Next

But I don't know if it is possible to access it like this?

 

Parameters mappings.png



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 22 of 26

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

Sorry for keeping you wait so long.

Could you look at the attached vba code.

It demonstrates the workflow that is implemented by “Change Size” command in UI.

This code reads family data from the last component assuming that it is a CC member.

Then the user enters new row number.  New model parameters and iProperties values are applied to the member model.  New file is not created.

 

As a ”proof of concept” this code was tested with some structural profiles families only (angles, channels, i-beams).  But hope you could modify it to suit your needs.

Best regards,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 23 of 26

Jef_E
Collaborator
Collaborator

Hello @Vladimir.Ananyev this is what I'm looking for I guess, tried it several times and it seems promising. I will try to implement this and will defenitly feedback on this.

 

But in my opinion this could be it! If it works you guys should add this into the programming help.

Thanks!



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 24 of 26

wcurtisJM53W
Participant
Participant
Accepted solution

I think there are a couple problems in the code provided by @Vladimir.Ananyev (though it got me going in the right direction, and I'm glad for that).

 

The code stores the selected row value in the MemberId field of the Content Library Component Properties, but this is not correct.  After running the code, if the user right-clicks the part and selects Change Size, the incorrect table row information will be preselected.  Instead, it is possible to harvest the correct Id value from the ContentTableRow.ContentIdentifier property of the selected row.

 

sContentId = oFamily.TableRows.Item(i).ContentIdentifier
sMemberId = Mid(sContentId, sContentId.LastIndexOf("#") + 2)
oProps.Item("MemberId").Value = sMemberId

 

The other problem I've found is that threaded features aren't updated.  Still working on a solution for that.

 

0 Likes
Message 25 of 26

william.pick
Enthusiast
Enthusiast
My hero! Thanks so much!
0 Likes
Message 26 of 26

zawthuratun
Explorer
Explorer
Accepted solution

Thank you all for this post. I've adapted the code to iLogic to make it run for my needs to be able to change an HSS tube and channel's size. Not sure how to implement this for frame generator, but to be able to change size for content center members, this is just what I needed!

 

Turns out Change Size command basically just reads from a content center table and pushes it to the selected part.

 

The code attached essentially does this, but I've added a crude drop down form to be able to select the sizes available for the content center member. See the link from adndevblog for the major leg work of the code.

 

To be implemented later is to be able to change the length of the member, but that should be straight forward enough by changing the occurrence's "bar length" through iLogic.

 

Best of luck all.

 

 

0 Likes