Not pretending this is some run-of-the-mill activity for me but I had to attempt to figure out what the problem was with Tim's add-in for the Fusion post. The add-ins are written in Python, which pretty much rules me out when it comes to understanding what is going on at any depth, let alone making any changes. Javascript (used in the post processors) is about my limit and even then I wouldn't want to risk an old shirt on that. However, the debug feature within VSC seems to be almost usable by the likes of me - or at least enough to give me a clue where the problem lies. Question is whether I even have enough brainpower to work out how to use it.
Took me a while to understand the intro Tim gave me, along with the tutorial type material in his link. Here's what he said. This was enough to provoke me into giving it a go:
Since you know how to modify a post processor, you should have no trouble learning how to debug a Fusion 360 add-in. It requires Visual Studio Code. There's a quick tutorial (although slightly out of date) at:
https://modthemachine.typepad.com/my_weblog/2019/09/debug-fusion-360-add-ins.html
All we want to do is use a breakpoint to stop execution at line 892 where the call is made to Fusion 360 to post the operation. Then single step ahead a few lines to line 902 where the program opens the file Fusion 360 generated.
This link in turn took me to this page and I also found various Pootube vids, some of which were helpful, others not.
Lesson #1
Some tosser at Microsoft decided to rename "Debug" as "Run" within VSC. That's designed to catch out beginners like me - as indeed it did for 20 mins or so. Thank you, tosser.
Anyway, I thought I'd note down what to do, as I have goldfish genes and if I ever need to repeat this exercise, I don't want to go through the learning process again.
Setting up VSC to debug the add-in:
Assuming the add-in is already installed (follow Tim's instructions), you need to stop it, then restart it in debug mode. For this, you need to be in the manufacturing environment and select Utilities > Add-Ins, then select the Add-Ins tab, find PostProcessAll within "My Add-Ins", select it and hit the "Stop" button.
No comments:
Post a Comment