Hi,
I made a model that can be adjusted by using a ilogic form.
This alters the parameters in my "master" part & then changes my part in my assembly.
Problem: the form is located in my "master" part is there a way to access the form from my assembly?
Thanks.
You can't access the form, however you can access the parameters directly. You could also change the form to a global form, which would make it available in the assembly. What are you trying to do with it? Ae you trying to drive the part from the assembly? If so, then you need to copy that form over into your assembly and then write a rule to copy those value back over to your master part.
Parameter("MyMasterPart:1", "MyPartParameter") = MyAssemblyParameter
This works only if the part is a component of the assembly.
Hello,
I'm pretty new to iLogic and am working on my first project.
I have created an assembIy with 3 components and I want to be able to drive the parameters (width and visibleheight) of one component from a iLogic form in its assembly.
I tried copying the code you suggested but I'm recieving an error, Catastrophic failure (Exception from HRESULT: 0x8000FFFF(E_UNEXPECTED)), on the piece of code (see below) when I try to drive the values from the form.
What I'm trying to do is drive the parameters "width" and "visibleheight" of part Q00401:1 from the assembly.
I can change the values in the part parameters, however they automatically revert to 0mm when I update the assembly, plus the whole point is to allow me to drive them from the iLogic form at assembly level.
Any help on this would be much appreciated as I'm working to pretty tight deadlines on this!
Hi,
You have missed to assaign "string" name to get InputBox Output.....
Example:
If width > 2200 Then
MsgBox("Width exceed maximum")
width = InputBox("Prompt", "Title", "600")
End If
Parameter("Q00401:1","width") = width
Hi,
There is a way to access a from from your assembly file.
1) Make a rule in the master part. choose option don't run automaticlly
iLogicForm.Show("Form 1")
2) Make a rule in the assembly (enter the rule name that you gave youre rule in the master part)
Sub Main auto = iLogicVb.Automation ' Set Rule name Dim ruleName As String ruleName = "Show Form" ' Get the active assembly. Dim oAsmDoc As AssemblyDocument oAsmDoc = ThisApplication.ActiveDocument ' Get all of the referenced documents. Dim oRefDocs As DocumentsEnumerator oRefDocs = oAsmDoc.AllReferencedDocuments ' Iterate through the list of documents. Dim oRefDoc As Document For Each oRefDoc In oRefDocs Dim rule As Object rule = auto.GetRule(oRefDoc, ruleName) If (rule Is Nothing) Then 'Call MsgBox("No rule named " & ruleName & " was found in the document.") Else 'MessageBox.Show(rule.Name, oRefdoc.displayname) Dim i As Integer i = auto.RunRuleDirect(rule) End If Next End Sub
What this rule basiclly does is activate all rules in the assembly with name 'x'.
Hope that this helps you a bit.
Hi,
Would like to know whcih verion of inventor you are using. If it is Inventor version 2012 or higher than that, You can use Form, Instead of "Input Box" Option.
1) In Form Tab (Near Rule Tab)--> Right Click Mouse --> Add Form
2) Change Predifined Button to "Ok Cancel Apply"
3) Drag & Drop "Width" Parameter into the Right Tab & Press Ok
Well you can do a lot with Form easily, you can add Text, Image, Drop Down Menu...etc.... do check out the below forum
You can add a rule in the Ilogic browser forms section.
Right click in the whit area where you can add a form. But instead of adding a form you choose edit and drag the rule into the field. This making a button for the rule (like the form buttons).
Can't find what you're looking for? Ask the community or share your knowledge.