Is it possible to insert comment lines in Dispatch to make the code easier to understand?
So far I have only found the possibility to use the Label command for this, but this is actually intended for jump instructions.
I have also tried to copy paste the code to Notepad to insert comments and notes, but the code can be marked in the Dispatch Editor, but not copied.
I would also like to describe the basic function of the dispatch in a few lines at the beginning of the code, just as you normally do with macros.
It would also be very nice if you could open the ACN file with an editor to quickly use parts of a code as a reference for a new dispatch as a template.
How do you manage different versions of a dispatch when you introduce improvements or extensions? A comment function would also be helpful here to document the changes in the code.
Which SWX version is the editor from? Reminds me of when I was young and had my first experiences with Basic on the Commodore C64.
Dispatch - Comment code, manage/save versions.
Dispatch - Comment code, manage/save versions.
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
Re: Dispatch - Comment code, manage/save versions.
I tried dispatch for a while. Now I distain it and would like to keep it out of the vault. AFAIK there's no good way to find all the things dispatch scripts may be mingling with. It's just another place to need to go when it's time for trouble shooting. With enough variables a computer can get pretty close to random behavior. Just my opinion, but in the long run you'll be better served just figuring out Visual Studio and using the PDM APIs directly. Much better commenting, source control, and debugging ability.
Just my $0.02
Just my $0.02
- jcapriotti
- Posts: 1870
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1215
- x 1999
Re: Dispatch - Comment code, manage/save versions.
LABEL is the only option., and as you mentioned....its meant for the JUMP command so it kind of muddies the water. Dispatch needs work and enhancements (notepad edit is a good one), but as @bnemec mentioned, its better to go to the API if that's an option for you. That said, we use both Dispatch and the API as I don't have the resources to code something as an add-in. Too many Add-ins have performance issues as well.....or did in the past.Hansjoerg wrote: ↑Fri Jul 12, 2024 5:57 am Is it possible to insert comment lines in Dispatch to make the code easier to understand?
So far I have only found the possibility to use the Label command for this, but this is actually intended for jump instructions.
I have also tried to copy paste the code to Notepad to insert comments and notes, but the code can be marked in the Dispatch Editor, but not copied.
I would also like to describe the basic function of the dispatch in a few lines at the beginning of the code, just as you normally do with macros.
It would also be very nice if you could open the ACN file with an editor to quickly use parts of a code as a reference for a new dispatch as a template.
How do you manage different versions of a dispatch when you introduce improvements or extensions? A comment function would also be helpful here to document the changes in the code.
Which SWX version is the editor from? Reminds me of when I was young and had my first experiences with Basic on the Commodore C64.
I would document the dispatch code changes in a Word document in your vault rather than try and shoe horn it into the code. I think the Dispatch UI is custom built....its old and been in the software for as long as I can remember....probably before SolidWorks purchased it. It's just an add-in itself, someone could create something similar and better if there were a market for it.
Jason
Re: Dispatch - Comment code, manage/save versions.
Good point on too many add-ins causing issues, lots of hooks to lots of events and loading of libs at runtime.jcapriotti wrote: ↑Fri Jul 12, 2024 11:26 am LABEL is the only option., and as you mentioned....its meant for the JUMP command so it kind of muddies the water. Dispatch needs work and enhancements (notepad edit is a good one), but as @bnemec mentioned, its better to go to the API if that's an option for you. That said, we use both Dispatch and the API as I don't have the resources to code something as an add-in. Too many Add-ins have performance issues as well.....or did in the past.
I would document the dispatch code changes in a Word document in your vault rather than try and shoe horn it into the code. I think the Dispatch UI is custom built....its old and been in the software for as long as I can remember....probably before SolidWorks purchased it. It's just an add-in itself, someone could create something similar and better if there were a market for it.
Also a neat idea about using a text doc for comments (and version history) of the dispatch script. However, code in Word kinda gives me the heebie-jeebies. Please consider using notepad++ for text docs. Its pretty good at interpreting many languages for colorful syntax.
Re: Dispatch - Comment code, manage/save versions.
VSCode is another good option.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams