Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tool render in excel sheet ???

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
451 Views, 3 Replies

Tool render in excel sheet ???

Is it possible to put the tool render in the excel setup sheet like in the html one ? If yes how ? because I have been searching for hours to understand how without any result...

 

thanks for the help 

3 REPLIES 3
Message 2 of 4
Laurens-3DTechDraw
in reply to: Anonymous

See the toolRenderer variable in the HTML setup-sheet.

That is how the image is made in the HTML version.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 3 of 4
George-Roberts
in reply to: Anonymous

Yep, like Laurens said, use the data from the HTML setup sheet:

 

define a two new variables:

var toolRenderer;
var exportedTools = {};

 

in onOpen add:

    toolRenderer = createToolRenderer();
    toolRenderer.setBackgroundColor(new Color(1, 1, 1));
    toolRenderer.setFluteColor(new Color(40.0/255, 40.0/255, 40.0/255));
    toolRenderer.setShoulderColor(new Color(80.0/255, 80.0/255, 80.0/255));
    toolRenderer.setShaftColor(new Color(80.0/255, 80.0/255, 80.0/255));
    toolRenderer.setHolderColor(new Color(40.0/255, 40.0/255, 40.0/255));
 

in onSectionEnd add:

 var id = tool.number;
        var path = "tool" + id + ".png";
        var width = 2.5 * 100;
        var height = 2.5 * 133;
        try {
          if (!exportedTools[id]) {
            toolRenderer.exportAs(path, "image/png", tool, width, height);
            exportedTools[id] = true; // do not export twice
           }
        } catch(e) {
          // ignore
        }

Once you have this inserted, you should get the tool image in the same folder as the setup sheet. I use excel VBA to pull the images in and place them usually

 

Message 4 of 4

Good morning, I am returning to the post after a long time as I have recently discovered the possibility of creating installation sheets in excel format. In the post I tried to insert the suggested instructions and during processing I don't receive error messages but the creation of the images of the tools is not even performed. I can't figure out where I went wrong. I'm attaching the post I edited if it helps.
Best regards.

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

Post to forums  

Autodesk Design & Make Report