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: 

Grounding component/occurrence

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
brad.bylls
266 Views, 4 Replies

Grounding component/occurrence

How do you ground a component with the API?

I tried:

component.isGrounded = True

componentOcc.isGrounded = True

 

Doesn't work.

Any help appreciated.

Brad Bylls
4 REPLIES 4
Message 2 of 5
davemwhiteley
in reply to: brad.bylls

Hi Brad,

I know it's been a while, but I came across your post with the same problem.,

You need to get the occurrence and ground that, i.e.

 

            product = app.activeProduct
            design = adsk.fusion.Design.cast(product)
            rootComp = design.rootComponent
            occ0 = rootComp.occurrences.itemByName('Box:3')
            occ0.isGrounded=True
 
I hope this helps?
Message 3 of 5
brad.bylls
in reply to: davemwhiteley

Thank you Dave.

Brad Bylls
Message 4 of 5
MichaelT_123
in reply to: brad.bylls

Hi Mr Brad.Bylls

 

Consider looking into the few years old conversation:

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/i-am-isgrounded/m-p/7169797

 

I am not sure if the API ground is still the same, but ...

 

Regards

MichaelT

 

MichaelT
Message 5 of 5
brad.bylls
in reply to: MichaelT_123

@MichaelT_123 

This what I ended up using at the time.

	root = design.rootComponent
	occ = root.occurrences.item(0)
	comp = occ.component
	subOcc1 = comp.occurrences.item(0)
	subOcc1Proxy = subOcc1.createForAssemblyContext(occ)
	subOcc1Proxy.isGrounded = True

Thanks for the input.

 

Brad

Brad Bylls

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