Inventor Engineer-to-Order

Reply
Valued Contributor
johnasp1
Posts: 101
Registered: ‎05-30-2006
Message 1 of 9 (212 Views)

How to get one rule to wait for another rule to complete it's function.

212 Views, 8 Replies
04-05-2012 12:56 PM

I have a rule called 'ProcessPNG' that will create jpg and png images and sends them to a folder with a name.

I have another rule called 'Report' that will ProcessReport, which uses the images created and puts them into a word doc. I can run the 'ProcessPNG' rule first and it works, then when I run the 'Report' rule it works correctly also.


I need one rule that will process the 'ProcessPNG' rule first and wait for it to complete, then process the 'Report' rule.

Any suggestions?


 

 


Employee
Chris.Palmatier
Posts: 177
Registered: ‎05-27-2010
Message 2 of 9 (209 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-05-2012 02:30 PM in reply to: johnasp1

I typically have the image writing rule return the path to the image, then supply that rule name to the PictureFile parameter in the picture writer child. That way, when the picture writer child gets evaluated, it demands the value of my image writing rule. See the Office Sample in the ETO Samples project for an example.



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

Member
johnasp
Posts: 3
Registered: ‎05-12-2010
Message 3 of 9 (197 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-06-2012 07:06 AM in reply to: Chris.Palmatier

Chris

   Thanks for the reply. I set up my rules according to your response and can see when the picture writer child gets evaluated it demands the value of my image writing rule. That is now working, I am still having some problems

with crashing when I evaluate the 'report' rule. It would be helpful to see some examples.

 

  You mentioned "See the Office Sample in the ETO Samples project for an example."

I search my folders and couldn't fine the sample file, can you give me a location where they should be

or is there a download link I may not have these files.

  Thanks, John

 

Autodesk Intent™ Professional 2011

64-Bit Edition

Copyright © 2010 Autodesk, Inc.

Version 4.3 

Build: 482 Date: 4/26/2011

     With

AutoCAD 2011


Employee
Chris.Palmatier
Posts: 177
Registered: ‎05-27-2010
Message 4 of 9 (192 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-06-2012 08:04 AM in reply to: johnasp

Hi John,

The Office Sample is an Inventor sample. The use of the office designs is the same in any host, this sample just uses an Inventor model. 

 

To look at the sample, start Inventor and open the Intent Samples project. It should be in your projects list. Create a new Intent (mm) assembly, and set the root design to Office Sample.



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

Valued Contributor
johnasp1
Posts: 101
Registered: ‎05-30-2006
Message 5 of 9 (188 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-06-2012 08:42 AM in reply to: johnasp1

Chris

   This is the system that I am using:

 

Autodesk Intent™ Professional 2011

64-Bit Edition

Copyright © 2010 Autodesk, Inc.

Version 4.3 

Build: 482 Date: 4/26/2011

     With

AutoCAD 2011

 

Since I don't have Inventor is there a way I can get the Office Sample for my system?

John

Employee
Chris.Palmatier
Posts: 177
Registered: ‎05-27-2010
Message 6 of 9 (186 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-06-2012 09:27 AM in reply to: johnasp1

We don't have a working sample for AutoCAD, but you can look at the designs by adding the Inventor samples to your library search path. On Win7 and Vista, you can find the Inventor Samples here:

 

C:\Users\Public\Documents\Autodesk\Intent 2011\Inventor\Samples

 

The most interesting design for you will be WordDocument.iks



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

Employee
JackGregory
Posts: 189
Registered: ‎03-06-2006
Message 7 of 9 (168 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-10-2012 10:03 AM in reply to: johnasp1

Rule DoIt As Any

   ProcessPNG

   Report

End Rule

 

Piece of cake...

 

WIthin a rule, evaluations are procedural.

Board Manager
Jon.Balgley
Posts: 243
Registered: ‎08-23-2006
Message 8 of 9 (164 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-10-2012 10:17 AM in reply to: johnasp1

BTW the rule-name above is "doit" (with an "i") not "DOLT" (with an "L").  The font makes it look bad.  Obviously, no insult was intended!:smileyhappy:



Jon Balgley
Autodesk Configurator 360 / Inventor ETO team
Autodesk, Inc.

Valued Contributor
johnasp1
Posts: 101
Registered: ‎05-30-2006
Message 9 of 9 (144 Views)

Re: How to get one rule to wait for another rule to complete it's function.

04-20-2012 07:01 PM in reply to: Jon.Balgley

Here is an example of a rule that writes a png file to a folder(below).When I envoke this rule it will not run until

I mouse over the Model View. As soon as I mouse over the Model view it runs. Could there be something in my settings that requires this.

 

Rule ACADPNGOut As Any
acad_Command({"Model" })
acad_Command({"Filedia", "0"}) 'Added
acad_Command({"-View", "Restore", "CBCIso"})'Added
acad_command({"Zoom", "Extents"})'Added
acad_command({"PERSPECTIVE", "1"})'Added
acad_command({"PNGOUT", PNGFileName,"ALL", ""})
acad_Command({"-View", "Orthographic", "Front"})
acad_command({"PERSPECTIVE", "0"})
Return PNGFileName
End Rule

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube