I have an assembly with around 120 variants in it.
I am getting a little annoyed having to click the OK button when asked:
"Do you want to save changes to 122.iam" and its dependants"
is there any way to set the default to OK?
(other than setting an electric motor and a poking device up)
i would like to leave it over night etc...
thanks in advance
Solved! Go to Solution.
Solved by ThomasB44. Go to Solution.
The only place I thought this message might be (which I wasn't holding my breath) would have been in the application options under the prompts taband it wasn't there.
I know what you are talking about and this is a pain. Unless there is an iLogic routine that does this I am not sure there is a way around other then to keep doing what you are doing.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
Hey,
I've got the same problem for ±110 variants. There isn't any setting available in the "prompts" tab in the application option of Inventor 2016. Has anyone got any ideas?
If iLogic is the answer, any basic code to start with would be helpfull.
Many thanks to all who give any clues at all.
Paul
Hi @Anonymous
Please try this iLogic rule :
SyntaxEditor Code Snippet
InventorVb.DocumentUpdate() 'If it is an iPart If ThisDoc.Document.DocumentType = kPartDocumentObject Then Dim oDoc As PartDocument = ThisDoc.Document Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition Dim oFactory As iPartFactory = oDef.iPartFactory Dim oRow As iPartTableRow For Each oRow In oFactory.TableRows oFactory.CreateMember(oRow) Next End If 'If it is an iAssembly If ThisDoc.Document.DocumentType = kAssemblyDocumentObject Then Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As AssemblyComponentDefinition = oDoc.ComponentDefinition Dim oFactory As iAssemblyFactory = oDef.iAssemblyFactory Dim oRow As iAssemblyTableRow For Each oRow In oFactory.TableRows oFactory.CreateMember(oRow) Next End If iLogicVb.UpdateWhenDone = True
Thomas
Mechanical Designer / Inventor Professionnal 2023
Thomas,
this iLogic does the trick. Many many thanks! Now I can generate all files without looking (e.g. before going home). This is a solution for me!
@oneshortplanck: I'm sorry, but your work around did not seem to work here. I think you'll like Thomas his code as well. But many thanks for your suggestion.
grz
@Anonymous
You're welcome
In a particular case, like populate some iProperties that are not in the factory table, members are not saved.
In fact, like with the right click command "Generate members", the members are generated if there is a model or a factory table change.
To prevent this, you can click on the "rebuild all" command before run the rule or you can add at the start of the rule :
SyntaxEditor Code Snippet
ThisDoc.Document.Rebuild()
So in this way, Inventor believe all members have been modified and save them all, even if there is no changes, but it could be a longer operation.
Thomas
Mechanical Designer / Inventor Professionnal 2023
Oh, that's funny. I did the same with Inventor API recently. After keyusers tests we will roll that out to the complete company.
protected override void ButtonDefinition_OnExecute(NameValueMap context) { Document doc = InventorApplication.ActiveDocument; if (doc.DocumentType.Equals(DocumentTypeEnum.kAssemblyDocumentObject)) { //für Baugruppen AssemblyDocument thisAssembly = doc as AssemblyDocument; if (thisAssembly.ComponentDefinition.IsiAssemblyFactory) { iAssemblyFactory factory = thisAssembly.ComponentDefinition.iAssemblyFactory; iAssemblyTableRows rows = factory.TableRows; foreach (iAssemblyTableRow row in rows) { factory.CreateMember(row); } } else { MessageBox.Show("Das ist kein iPart und keine iAssembly!"); } } if (doc.DocumentType.Equals(DocumentTypeEnum.kPartDocumentObject)) { //für Bauteile PartDocument thisPart = doc as PartDocument; if (thisPart.ComponentDefinition.IsiPartFactory) { iPartFactory factory = thisPart.ComponentDefinition.iPartFactory; iPartTableRows rows = factory.TableRows; foreach (iPartTableRow row in rows) { factory.CreateMember(row); } } else { MessageBox.Show("Das ist kein iPart und keine iAssembly!"); } } }
Additionally keyusers tell me that the generation seems a lot faster in Inventor 2018, without inital lag like with right-click "Generate members".
Be aware that if you are connected to Vault, in case of iAssemblies with subassemblies all components must be already on local disk, otherwise you will have unresolved references.