How to print a image

How to print a image

nubrandao
Collaborator Collaborator
181 Views
3 Replies
Message 1 of 4

How to print a image

nubrandao
Collaborator
Collaborator

Hi, is possible to build a script were i can print a image of my part for manufacture use?

 

I use setup sheet for CAM, but imagem is top small and is on a ISO perspective.

 

I want to Run a script that works like CTRL+p and opens UP the image were i can copy to my setup sheet.

 

And do this with my current view

0 Likes
Accepted solutions (1)
182 Views
3 Replies
Replies (3)
Message 2 of 4

rohit_maneYV8C9
Autodesk
Autodesk
Accepted solution

Hello @nubrandao ,

You can refer to this example to capture the screen. It uses the Viewport.saveAsImageFile method. However, if you need more control over specific attributes, you can use the Viewport.saveAsImageFileWithOptions method instead. For instance, it allows you to set properties such as SaveImageFileOptions.isBackgroundTransparent.

0 Likes
Message 3 of 4

nubrandao
Collaborator
Collaborator

I dont understand pyton, i know to create script

 

How should look like the script if i want to apply Viewport.saveAsImageFileWithOptions method instead. For instance, it allows you to set properties such as SaveImageFileOptions.isBackgroundTransparent.

0 Likes
Message 4 of 4

rohit_maneYV8C9
Autodesk
Autodesk

Similarly as shown in example, This way you can use those saveAsImageFileWithOptions method.

SaveImageFileOptions = adsk.core.SaveImageFileOptions.create(filePath)
SaveImageFileOptions.isBackgroundTransparent = True
app.activeViewport.saveAsImageFileWithOptions(
            SaveImageFileOptions)
0 Likes