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: 

Problem with occurrence->transform ( matrix )

1 REPLY 1
Reply
Message 1 of 2
julian.tilbury
263 Views, 1 Reply

Problem with occurrence->transform ( matrix )

I'm trying to (in pseudocode):-

Create Component
Create Tool (MatrixA)
Cut Component with Tool, keep Tool Transform Tool (MatrixB) Cut Component with Tool, delete Tool done

using:-

Ptr<Matrix3D> matrix = ...
Ptr<Occurrence> occurrence = ....

occurrence->transform ( matrix );

I've seen this - (https://forums.autodesk.com/t5/fusion-360-api-and-scripts/how-do-i-reposition-an-occurrence-without-...) - which implies this is the correct way to do it, and I can use both MatrixA or MatrixB to create the tool in either of the two correct position, but I can't transform the tool after its created.

 

I haven't got to the cutting yet. I'm just creating a component and then moving it around via its occurence so

I can test if I can move to another position.

 

What am I missing?

1 REPLY 1
Message 2 of 2

I'm missing that after moving a component and taking an action (which I'm doing in my test code) the system

sends a message to ask if I'm sure I want to move the component, and because I'm not handling the event

in my code, it defaults to false and moves the component back to its original location, hence it doesn't appear

to move.

 

Now I'm looking at a ton of documentation trying to figure out what even is sent, and how to reply. occurrence->transform documentation, which I expected to tell me, is silent on the whole issue.

 

Can anyone help by giving more specific information on the event, the handler, and the reply?

 

 

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