- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
So i've revisited this recently with spare time.
i have set up a configuration form based on the user parameters which drives the 3D sketch overall size dimensions.
and have a set parameter rule when i want to run the changes applied in the form.
the code for the set parameter rule is here:
Public Sub Main() CopyUserParams() End Sub Private Sub CopyUserParams() If ThisDoc.Document.DocumentType <> Inventor.DocumentTypeEnum.kAssemblyDocumentObject Then MsgBox("The active document must be an assembly.") Return End If Dim asmDoc As Inventor.AssemblyDocument = ThisDoc.Document For Each refDoc As Inventor.Document In asmDoc.AllReferencedDocuments ' Look for part documents. If refDoc.DocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject Then Dim partDoc As Inventor.PartDocument = refDoc Dim refDocUserParams As UserParameters = partDoc.ComponentDefinition.Parameters.UserParameters ' Add the assembly parameters to the part. For Each asmUserParam As UserParameter In asmDoc.ComponentDefinition.Parameters.UserParameters ' Check to see if the parameter already exists. Dim checkParam As UserParameter = Nothing Try checkParam = refDocUserParams.Item(asmUserParam.Name) Catch ex As Exception checkParam = Nothing End Try If checkParam Is Nothing Then ' Create the missing parameter. refDocUserParams.AddByExpression(asmUserParam.Name, asmUserParam.Expression, asmUserParam.Units) Else ' Update the value of the existing parameter. checkParam.Expression = asmUserParam.Expression End If Next End If Next iLogicVb.UpdateWhenDone = True End Sub
However, this all works well prior to the frame generator feature being used. the form does exactly what i require.
after i have used frame generator the form does not work and displays an error. I'm assuming it's because the frame generated parts are the issue as the form works with these parts suppressed.
is there a iLogic rule i can use to update the frame members once or during the set parameters rule is run?
The assembly is attached in a .zip file which contains the frame generated members in a file and the 3D sketch.
Kind Regards,
Ben