Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Trigger

4 REPLIES 4
Reply
Message 1 of 5
AJ1227
467 Views, 4 Replies

iLogic Trigger

Hello all,

 

I have a strange problem that I hoped you could help me with.  I have a few assemblies setup that are controlled with a bunch of iLogic rules to modify all related parts when parameters are changed at the assembly level.  I also have an opening message that pops up when the assembly model is opened (After Open Document trigger) to tell people how to use the parameters to make modifications.

 

Now, when this assembly model is placed into a drawing I am getting random pop ups of the opening message when placing views of additional models in the same drawing.  If you open the drawing and try to place a base view of another model, Inventor stops to think for a minute or so before having the opening message of the iLogic controlled model pop up.  The only event trigger for this message is "After Open Document" and the model is not being opened; anyone know why it is being triggered in the drawing and/or how to make it stop?

 

Thanks,

4 REPLIES 4
Message 2 of 5
jdkriek
in reply to: AJ1227

Actually it is technically "opening" the model document from the drawing.

 

Put this in your rule in the part document...

 

' Stops drawing from calling rule
If ThisDoc.Document.DocumentType = 12290 Then
	' put all your code here
End If 
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 5
AJ1227
in reply to: jdkriek

When I insert this text into my document the message no longer pops up in the drawing, but also when the assembly is opened.  I believe 122290 is ".ipt" and 122291 is ".iam" (my message is at assembly level, not part); 122291 allows it to pop up in the assembly but also the drawing.  Not sure what the fix is.

Message 4 of 5
swordmaster
in reply to: AJ1227

try this

If ThisDoc.Document.DocumentType <>12292 Then

Inventor 2010 Certified Professional
Message 5 of 5

Document Types. from DocumentTypeEnum Enumerator in Inventor APi Help:

 

Name

 

Value

 

Description

kAssemblyDocumentObject 12291 Assembly Document.
kDesignElementDocumentObject 12294 Design Element Document.
kDrawingDocumentObject 12292 Drawing Document.
kForeignModelDocumentObject 12295 Foreign Model Document.
kNoDocument 12297 No Document.
kPartDocumentObject 12290 Part Document.
kPresentationDocumentObject 12293 Presentation Document.
kSATFileDocumentObject 12296 SAT File Document.
kUnknownDocumentObject 12289 Unknown Document.

 

It easier to read name DocumentTypeEnum.kDrawingDocumentObject than number 12292


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report