ILogic rule works in assembly

ILogic rule works in assembly

patryk_walkusz
Contributor Contributor
140 Views
1 Reply
Message 1 of 2

ILogic rule works in assembly

patryk_walkusz
Contributor
Contributor

Hi,

I created a form for an IPT file, and when I open it, I made a rule to choose whether to open the form or not. When I open an IAM file with this IPT file, I also see this rule.

Can I add something to make this rule appear only when opening the IPT file?


my rules:

Dim result As DialogResult
result = MessageBox.Show("Do you want to open the form for editing?", "Edit Glass - Form", MessageBoxButtons.YesNo)

If result = DialogResult.Yes Then
    ' Kod do otwarcia formularza
    iLogicForm.Show("GlassEdit")
Else
    ' Kod, gdy użytkownik wybierze "Nie"
End If

 

I put this rule after open document:

patryk_walkusz_0-1744793928892.png

 

0 Likes
Accepted solutions (1)
141 Views
1 Reply
Reply (1)
Message 2 of 2

Andrii_Humeniuk
Advisor
Advisor
Accepted solution

Hi @patryk_walkusz . You can add a document type check to your rule. Example:

If Not ThisApplication.ActiveDocumentType = DocumentTypeEnum.kPartDocumentObject Then Exit Sub
Dim result As DialogResult
result = MessageBox.Show("Do you want to open the form for editing?", "Edit Glass - Form", MessageBoxButtons.YesNo)

If result = DialogResult.Yes Then
    ' Kod do otwarcia formularza
    iLogicForm.Show("GlassEdit")
Else
    ' Kod, gdy użytkownik wybierze "Nie"
End If

Or place your rule in the event trigger of the parts:

Andrii_Humeniuk_0-1744796589137.png

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature