Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate images of assemblies which have rendering turned off

7 REPLIES 7
Reply
Message 1 of 8
bsee1
627 Views, 7 Replies

Generate images of assemblies which have rendering turned off

I've made a few slightly related posts to this so far.  My ETO system has stations.  Some of those stations(called baseline stations) are not rendered, but hold the default values for other stations.  In my quote, I need to produce an image of each of these baseline stations.

 

How can I generate an image of an assembly that has rendering turned off?  I tried using iv_saveimage(), but it generates a completely blank picture.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
7 REPLIES 7
Message 2 of 8
Casey.Motherway
in reply to: bsee1

Maybe my understanding of your problem is incorrect, but I do not see how you could generate an image of these models unless you render them first.

Message 3 of 8
bsee1
in reply to: Casey.Motherway

I guess that's the point. What I need is something ETO probably wasn't designed for. I need to somehow make it work anyway.  

 

This might take slightly longer, but would there be a way to programmatically turn rendering on temporarily, generate the images, then turn rendering off again?  I'm lookign for any ideas you might have.  The only one I cannot consider is turning rendering on permanently.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 4 of 8
Casey.Motherway
in reply to: bsee1

Try searching the API help (installed in the Help folder of ETO Components and ETO Server) for SetRuleValue.  I have not tried it, but I think you would use that to set render? to True/False via the API.

 

I did a quick test with the Batch Processor.  I was able to toggle the visiblity of an assembly and capture images.  The Batch Processor takes XML, mine looked like this:

 

<IntentServer name="Intent Server Sample" outputDir=".\Output" trace="true">


<Project name=".\PlayStructure.ipj" timing="true">

    <OpenFile name=".\Scaffolding.iam">
        <SetRuleValue part="Root.EdgeTubing_Horizontal_1" rule="render?" expression="true"/>
        <Evaluate expression="RenderSelf" timing="true"/>
        <Evaluate expression='iv_SaveImage(Root, True, :IsoTopRight, True, NoValue, NoValue, NoValue, NoValue, NoValue, NoValue, ".\Output\visible.jpg", 1000, 1000, "white", "white" )' />
        <SetRuleValue part="Root.EdgeTubing_Horizontal_1" rule="render?" expression="false"/>
        <Evaluate expression="RenderSelf" timing="true"/>
        <Evaluate expression='iv_SaveImage(Root, True, :IsoTopRight, True, NoValue, NoValue, NoValue, NoValue, NoValue, NoValue, ".\Output\hidden.jpg", 1000, 1000, "white", "white" )' />

    </OpenFile>
</Project>


</IntentServer>

 

The image with Root.EdgeTubing_Horizontal_1.render? = false:

 

hidden.jpg

 

The image with Root.EdgeTubing_Horizontal_1.render? = true:

 

visible.jpg


Message 5 of 8
bsee1
in reply to: Casey.Motherway

It looks like an interesting idea.  Is there something that would accomplish the same functionality for ETO on the desktop?  Our idea was to initially push this project to ETO OEM.  ThE Intent API didn't say anywhere it was specific to server, but I was unable to use it on the desktop successfully.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 6 of 8
Casey.Motherway
in reply to: bsee1

Yes, you can access the Intent API with a desktop application built on ETO OEM.  You should take a look at the ETO Conveyor Sample.  You can find it here under Desktop Samples (make sure you choose the right version).  Take a look at ConveyorModel.cs.

Message 7 of 8
bsee1
in reply to: Casey.Motherway

I know I can access the Intent API from desktop apps, I just thought the specific feature you mentioned (setrulevalue) was server only.  I was wonderign how I could accomplish replicate what that function is doing in code that runs on the desktop version.

 

From the api available to the desktop version, I saw no way to set the rendering of a station on, get a picture of it, then set rendering back to false.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 8 of 8
Casey.Motherway
in reply to: bsee1

SetRuleValue is not specific to ETO Server.  It is part of Autodesk.Intent.API which is also delivered with ETO Series.

 

Assuming you are working in Visual Studio, add a reference to Autodesk.Intent.API.dll which lives in the Bin directory of your ETO Components install location.

 

Then you can do something like this:

 

Autodesk.Intent.IntentAPI.Instance.ActiveModel.Root.GetChildren().Find("EdgeTubing_Horizontal_4").SetRuleValue("render?", true);
Autodesk.Intent.IntentAPI.Instance.ActiveModel.Root.EvaluateExpression(new Source("RenderSelf"));

Autodesk.Intent.IntentAPI.Instance.ActiveModel.Root.EvaluateExpression(new Source("iv_SaveImage(Root, True, :IsoTopRight, True, NoValue, NoValue, NoValue, NoValue, NoValue, NoValue, \"c:\\visible.jpg\", 1000, 1000, \"white\", \"white\" )"));

 

I know it is not pretty, but it does what you are trying to accomplish (well half of it anyway, the other half is just a repeat of this code).

 

Refer to the API documentation located in the Help folder of your ETO Components install location to get more info on the objects, methods and properties in the above code.

 

ETO Series 2012 (5.1) and 2013 included a Visual Studio template for creating an Inventor addin that is really nice for quickly testing out things like this.

 

Hope this gets you a little closer.

Regards,

-Casey

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

Post to forums  

Autodesk Design & Make Report