Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

EasyConvert- QD Plugin

(new features, see beta notes below)

What it does

Takes selected wires then finds and inserts a conversion for that wire. To do this, you have to intentionally create a broken wire, select it, then run the plugin. The plugin will insert the relevant function and create any necessary constants (i.e. the typecast type).

If no conversion is found, a type cast is automatically used. You can also default to typecast by holding shift while running the plugin.

What it converts

  • Byte array to string
  • String to byte array
  • Number to boolean array
  • Boolean array to number
  • Boolean to numeric
  • String to Path
  • Path to String
  • Array of Strings to Path
  • Path to Array of Strings
  • Scan String to Enum
  • Format Enum to String
  • Coerce to Enum
  • Variant to Data
  • Timestamp to Double
  • Double to Timestamp
  • Reference to More Specific
  • Reference to More Generic
  • 1D array to Element (note: for all array functions, elements must be same type. Works for all numerics, boolean, strings, paths, references, clusters, waveforms, variants)
  • 2D array to Element
  • 2D array to 1D array
  • Element to 1D array
  • 1D array to 2D array
  • Waveform bundle/unbundle
  • Element to Cluster (selects first element that matches the source, creates cluster constant)
  • Cluster to Element (selects first element that matches the sink)
  • Error array to single Error
  • Typecast

Example

Before.png

Then wire it up and select the wires

Wire.png

Then run the plugin

After.png

Version History

V 1.0- Release as document (from prototype: added conversion binary file instead of constant, fixed U8 enum conversions, error doesn't undo)

V 1.1- Fixed a bug with typecasted sinks, didn't wire correctly. Small fixes to binary file editor. Did a lot of commenting and cleaning.

V1.2- Fixed constant creation within sub-diagrams (for/while/case/etc).

V1.3- Added merge errors. Fixed variant to data connecting to wrong output. Added to VIPM.

V1.3 Beta- So the program flow has been bugging me a little and I woke up (hit my head on the sink) and came up with an idea. You have two options for running the program.

(1) Select an existing broken wire, it will insert at the selected segment(s).

(2) Run without selections. It will then wait for the next wire to show up (i.e. creating a brand new wire) or change (i.e. connecting an existing wire to a new sink terminal). It grabs the segment nearest that terminal and inserts the conversion function.

Personally, I like this programming flow better. This might be a little buggy, but it's getting better. (sorry for the spam... this board seems quiet)

-Also added waveform bundle/unbundle.

I am definitely open to new ideas and comments on the code (specifically the code that finds terminals on multi-sink wires)

Josh
Software is never really finished, it's just an acceptable level of broken
Message 1 of 2
(4,922 Views)

followed the progress of development since the start and wasn't able to figure out how this would help. Now I know - I used to assign a whole bunch of key kombinations like "i32" or "b2u8" for those conversion types of functions. With your shortcut I only ever need to remember CTRL+e.

Well done, mate!

0 Kudos
Message 2 of 2
(2,937 Views)