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: 

Origin CadObjectParameterValue on a linked component for CAM operations not working

0 REPLIES 0
Reply
Message 1 of 1
Joshua.mursic
91 Views, 0 Replies

Origin CadObjectParameterValue on a linked component for CAM operations not working

hello, I am trying to target the point, X axis and Z axis of the origin in a linked component and it is not being selected in the setup. When I do this with a non linked component, I am able to select these entities. Is there a way to select these parts in a linked component?

cam:adsk.cam.CAM = app.activeProduct
setups = cam.setups

# Create Setup Input
setupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)
setupInput.models = machiningBodies
setupInput.fixtureEnabled = True
setupInput.fixtures = [fixtureOccurence,stockOccurence]
setupInput.stockMode = adsk.cam.SetupStockModes.SolidStock
setupInput.stockSolids = [stockBody]
# Create Setup
setup = setups.add(setupInput)


# Defin Setup Parameters
setup.parameters.itemByName('wcs_orientation_mode').expression = "'axesZX'"
setup.parameters.itemByName('wcs_orientation_axisZ').value.value = [fixtureOccurence.component.xConstructionAxis]
setup.parameters.itemByName('wcs_orientation_axisX').value.value = [fixtureOccurence.component.zConstructionAxis]
setup.parameters.itemByName('wcs_origin_mode').expression = "'point'"
setup.parameters.itemByName('wcs_origin_point').value.value = [fixtureOccurence.component.originConstructionPoint]

Joshuamursic_0-1689892591302.png Joshuamursic_1-1689892730857.png

 

 

When I do this in a non linked component these are the results:

Joshuamursic_2-1689892778315.png

 

 

 

 

0 REPLIES 0

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