Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAM api to read operation time.

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
gina68ABR
179 Views, 3 Replies

CAM api to read operation time.

Hi!

 

is it possible to use the api fetch the time that fusion think an operation will take to run?

 

I’ve been poking around the docs for a while with no luck,

3 REPLIES 3
Message 2 of 4
Jorge_Jaramillo
in reply to: gina68ABR

Hi,

 

I believe this is you're looking for (I didn't tried before):

Jorge_Jaramillo_0-1702846563325.png

 

 

I hope this can help.

 

Regards,

Jorge Jaramillo

Software Engineer

 

Message 3 of 4

Hi again,

 

I was playing with the cam.getMachiningTime() method and I notice the result it reports does not change if I provide different FeedScale values; it always report the machine time according to the Feed Scale parameter that is set with the user interface as I highlight in the following image (as it reminds it):

 

Jorge_Jaramillo_0-1702850000289.png

Notice that for first operation the machine time is 1:03 at normal speed; doubling the speed with a feed scale of 200% the machine time is 0:31; and since it was set like so in the user interface, it always returns the same value for different feed scale values to the getMachiningTime() method.

It look likes there is BUG in this function.  Can Fusion Team take a look at it?

 

This is the script I used to test it:

def get_cam_data() -> None:
    cam: adsk.cam.CAM = app.activeDocument.products.itemByProductType('CAMProductType')
    if cam:
        for setup in cam.setups:
            app.log(f'  {setup.name}')
            for op in setup.operations:
                app.log(f'    {op.name}')
                for feedScale in range(10,25,5):
                    app.log(f' {" ":20}{feedScale/10=} {cam.getMachiningTime(op, feedScale/10, 20000, 0).machiningTime=}')

 

Regards,

Jorge Jaramillo

Software Engineer

 

Message 4 of 4
gina68ABR
in reply to: Jorge_Jaramillo

This is exactly what I was looking for, thank you!

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report