Problem with appearance

Problem with appearance

Anonymous
Not applicable
975 Views
8 Replies
Message 1 of 9

Problem with appearance

Anonymous
Not applicable

Hello. I have problem with appearance. It need to change face appearance, if button pressed, or row selected in dropdownInput. I try to change appearance in inputChanged Event, but after termination of this event, Fusion returned old appearance. How to solve this problem?  This is sample of add-ins in attachments. It will show problem with appearance and visual bug, when appearance stay old, but it look like yellow, after click on face, if appearanceType of this face is "Body" or "Materal". 

0 Likes
976 Views
8 Replies
Replies (8)
Message 2 of 9

liujac
Alumni
Alumni

It’s visual bug. I logged this issue in our internal system (UP-29391). The change in InputChanged event is not committed with the command, so the appearance should stay old after the command is terminated.

 

I recommend you set the appearance in Execute event. We only commit the changes made in Execute event. The changes made in other command events like InputChanged event just are preview and aborted right away.

 

For more information about Fusion Commands, please read http://fusion360.autodesk.com/learning/learning.html?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051.

 

Thanks,

Jack

0 Likes
Message 3 of 9

Anonymous
Not applicable

It is necessary, that the user saw the changes of appearance, when command is running. Is there any way to change the appearance, like in appearance command in fusion? Preview is not working. Appearance return to old, if inputChanged event is terminate, but command is still to active.

0 Likes
Message 4 of 9

liujac
Alumni
Alumni

You may make the changes in Command.executePreview event, and set CommandEventArgs. isValidResult to true in the event handler. You can take the “Bolt” sample on “Scripts and Add-Ins” dialog for reference.

 

Thanks,

Jack

0 Likes
Message 5 of 9

Anonymous
Not applicable

Thank you for your explanation. I will try to make this with Command.executePreview event.

0 Likes
Message 6 of 9

Anonymous
Not applicable

Appearance not apply to faces with Command.executePreview event  too :(. What I do wrong?

0 Likes
Message 7 of 9

liujac
Alumni
Alumni

Hi,

 

I checked your updated addin. The usage of ExecutePreview is correct in your updated addin, and it works on my side. Run you command, select a face, the face appearance is changed to yellow, click OK button to commit the change or click Cancel button to abort the change (but the color is not changed back when cancel, it’s a defect).

I guess you might select one face first, then select another face. In this case, the change on first face should be aborted, the problem is that the first face was still in yellow, it’s a visual bug as I said, I logged defect for this. I’m not sure if you have read the section about ExecutePreview event in http://fusion360.autodesk.com/learning/learning.html?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051&.... That would be helpful for you to understand the behavior.

 

Appearance panel is not a Command dialog. Currently, there is no API to create the panel UI.

 

Thanks,

Jack

0 Likes
Message 8 of 9

Anonymous
Not applicable

Hello, I read this article, but I understand this just now. I thought if we select face first time, appearance changed to yellow, if we select another face, this face will stay yellow everything. But first selected face should be aborted, if we selected another. I understand this. But it is not good for my plug-in. I use appearance in my command, that highlight some faces. If we aborted command - appearance should look like original appearance. And i find solutions for this bug in may plug-in. If I want original appearance after terminating event,  I should save original appearance, next I will change appearance to another, next I will change appearance to original.

0 Likes
Message 9 of 9

liujac
Alumni
Alumni

Right. You found a workaround for this problem. We logged this issue, and will fix it. Thanks for reporting this issue,

 

Thanks,

Jack

0 Likes