Is it possible to access / edit ifeature part worksheet table after creation

Is it possible to access / edit ifeature part worksheet table after creation

matt_jlt
Collaborator Collaborator
472 Views
4 Replies
Message 1 of 5

Is it possible to access / edit ifeature part worksheet table after creation

matt_jlt
Collaborator
Collaborator

I would like to know if anyone has a work around for editing or even viewing the table for an ifeature after it has been created / used. It seems as though there is a property / object that exists in the ifeature definition table but i am unable to reference or view it. I have tried to set it to an excel worksheet object and just a general object directly but it doesn't seem possible.

 

I'm hoping someone has any ideas for me?

 

Please note that this isn't how to edit the ifeature definition template, it's how to edit the table after the ifeature had been placed into a part already.

 

oDoc.ComponentDefinition.Features.iFeatures.Item(1).iFeatureDefinition.iFeatureTable.ExcelWorkSheet

 Thanks, Matt.

 

Inventor 2019 Pro / Windows 10

0 Likes
473 Views
4 Replies
Replies (4)
Message 2 of 5

JelteDeJong
Mentor
Mentor

did you see this blog post:

https://adndevblog.typepad.com/manufacturing/2013/07/inventor-api-ipart-functionality.html 

if that does not help then plz share what you want to do exactly. Maby me or some one else can provide an example for you

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

0 Likes
Message 3 of 5

matt_jlt
Collaborator
Collaborator

Thanks for your response. The info you provided was for an ipart factory which is a fairly straight forward thing to use. I am actually trying to edit an ifeature table after it has been placed inside of a part. This isn't something that you can do through the normal user interface. It has been requested as a new feature already, but I am trying to work out if i can get around the limitations and edit the worksheet that it references. 

 

I have even downloaded a structured file storage viewer to find if the table is stored inside the inventor part file somewhere so i can extract / edit it but so far have had no luck.

 

Hopefully this is a bit clearer for your understanding.

 

Thanks, Matt.

0 Likes
Message 4 of 5

JelteDeJong
Mentor
Mentor

Hi Matt,

the only thing i found that it's possible to set the active row in a iFeature. I used this code to test:

 

Dim doc As PartDocument = ThisApplication.ActiveDocument
Dim iFeature As iFeature = doc.ComponentDefinition.Features.iFeatures.Item(1)
If (iFeature.iFeatureDefinition.IsTableDriven) Then
    Dim row As iFeatureTableRow = iFeature.iFeatureDefinition.iFeatureTable.iFeatureTableRows.Item(1)
    iFeature.iFeatureDefinition.ActiveTableRow = row '<-- its possible to set te active row....
    'row.Item(2).Value = 20 '<-- works like iPart table but fails when set
    'Dim test As Excel.Worksheet = iFeature.iFeatureDefinition.iFeatureTable.ExcelWorkSheet'<-- throws exception
Else
    Dim ifeatureInput As iFeatureInput = iFeature.iFeatureDefinition.iFeatureInputs(2)
    MsgBox(ifeatureInput.Name & " - " & ifeatureInput.Prompt)
    ' ifeatureInput.Expression = "0.125" '<-- this will fail
    ' ifeatureInput.Value = "0.125" '<-- this will fail
End If

below some other things that i tryed but you have seen that probaly also.

 

The strange thing that its possible to get the "iFeatureInput ". its also posible to see the "value" and "Expression" altough it seem hidden properties. but its impossible to set them.

iFeatureInput.png

also setting the table like you would do in a iPart seems to fail.

and the excel workssheet property throws an exception....

excelsheeterror.png

 

out of curiosity are you able to extract any information with that tool (structured file storage viewer). ipt and iam files always seem like a black box and i would like to have a look inside.

 

 

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

0 Likes
Message 5 of 5

matt_jlt
Collaborator
Collaborator

Sorry for the long delay, I'm only just looking at this again now.

 

Yes, I can get some information out of the files but nothing really useful. I have narrowed down where I believe the datastreams for the table are kept but am unable to do anything with them. I tried replacing the stream from one file with another and it didn't seem to change anything.

 

My only goal is to be able to update the table of an ifeature after it has been created. I don't care if it is Via the API or externally via structured file interface. This is beacuse the inability to update an ifeature is a really poor implementation of it.

Also, I noticed that if someone places an ifeature inside a part then deletes the table / not the sketch. The part keeps the ifeature table data stored inside the part permanently, so it will continuously increase in size.

 

If anyone from Autodesk wants to help me out it would be great.

 

I think the data tables are kept in here Under RSeStorage > Templates.

 

structured data browser.png

 

Thanks, Matt.

 

0 Likes