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: 

How to create a square pipe using PipeFeatures?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
ph0en1x01
139 Views, 1 Reply

How to create a square pipe using PipeFeatures?

I want to create a square pipe using PipeFeatures. But I am unable to find an example related to it.

1 REPLY 1
Message 2 of 2
kandennti
in reply to: ph0en1x01

Hi @ph0en1x01 .

 

The API does not provide a way to create pipe features.
I believe it is possible to create the same shape using sweeps.

 

If you really want to create a pipe feature, the only way is to use the text command.
By slightly modifying the initPipe function in the sample here, it is possible to create a square pipe.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/use-textcommands/m-p/9645688 

def initPipe(path):

    sels :adsk.core.Selections = _ui.activeSelections
    sels.clear()
    sels.add(path)

    txtCmds = [
        u'Commands.Start PrimitivePipe',
        u'Commands.SetDouble SWEEP_POP_ALONG 1.0',
        u'Commands.SetString infoSectionType infoRectangular',
        u'Commands.SetDouble SectionRadius 0.5',
        u'Commands.SetBool PIPE_HOLLOW_OPTION 1', 
        u'Commands.SetDouble SectionThickness 0.1',
        u'NuCommands.CommitCmd'
    ]
    
    for cmd in txtCmds:
        _app.executeTextCommand(cmd)

    sels.clear()

 

However, we recommend using sweeps.

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