How to trigger forms to open in ipart only

How to trigger forms to open in ipart only

tim.schroeder3K47N
Enthusiast Enthusiast
894 Views
4 Replies
Message 1 of 5

How to trigger forms to open in ipart only

tim.schroeder3K47N
Enthusiast
Enthusiast

I only want my forms to open in part upon opening part; not in assemblies or drawings.

 

Currently, works fine when part is opened.  However, form opens when dropped into assembly (don't want this.)

 

Thanks

0 Likes
Accepted solutions (2)
895 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor
Accepted solution

Eliminate everything else, other than the one line to show the form.

Then, on your Manage tab, iLogic panel, open the Event Triggers dialog box.

If you only want this form to show when this document is opened, place this rule (ShowForm) under the "After Open Document" event on the "This Document" tab, then click OK.

 

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

ckeveryga
Advocate
Advocate

I can't download your part, but this should work for you.

oDoc = ThisApplication.ActiveDocument

If oDoc.DocumentType = kDrawingDocumentObject Then
	MessageBox.Show("Drawing")
Else If oDoc.DocumentType = kAssemblyDocumentObject Then
	MessageBox.Show("Assembly")
Else If oDoc.DocumentType = kPartDocumentObject Then
	MessageBox.Show("Part")
End If
0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor
Accepted solution

If you want to be able to access this form from other documents, copy the form over to the Global Forms tab of the iLogic tab.  Then change the code to

iLogicForm.ShowGlobal("CONVEYOR DATA")

If you always want a certain form to show every time any part document is opened, place the rule which shows the form under the "After Document Open" event of the "Parts" tab within the Event Triggers dialog box.  This tab deals with all parts, not just the active one.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

tim.schroeder3K47N
Enthusiast
Enthusiast

I appreciate your help, but this isn't what I was trying to do.

 

I wanted the form to open only when the part is opened.   For some reason, some of the parts open their forms when placed into an assembly.  I checked to make sure those parts are set up correctly (and they are.)  I'm not sure why it is not behaving consistently.

 

thanks.

0 Likes