News:

  • July 28, 2026, 09:18:17 PM

Login with username, password and session length

Author Topic: Problem with copy/paste whole code-block in Designer.  (Read 14933 times)

ERokc

  • Hero Member
  • *****
  • Posts: 118
Problem with copy/paste whole code-block in Designer.
« on: July 31, 2013, 09:02:24 PM »
I right click the code-block in Project Browser and COPY.
I create a new code-block.
I edit the new empty code-block and PASTE.
It appends to the original code-block, nothing entered in the new code-block?
What am I doing wrong?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3837
    • Host Engineering
Re: Problem with copy/paste whole code-block in Designer.
« Reply #1 on: July 31, 2013, 09:35:40 PM »
I right click the code-block in Project Browser and COPY.
I create a new code-block.
I edit the new empty code-block and PASTE.
It appends to the original code-block, nothing entered in the new code-block?
What am I doing wrong?
Nothing.  The copy/paste of code-blocks is not very good in Rel 1.0.x.  What was implemented was to easily copy code blocks BETWEEN projects, not WITHIN projects.  When done within a project, it just appends the logic to the code-block of the same name (yeah, not real helpful).

Rel 1.1 (due out soon) emulates Windows Explorer on the Copy operation within the SAME project like copying a file within the same folder.  It creates a new code-block with the name COPY_<original name>, then you can easily rename it via some prompts.  Also, any "code-block" structure elements within instructions are automagically replaced with the new code-block structure elements (e.g. RunMotorA.S15 in the SOURCE becomes COPY_RunMotorA.S15 in the DESTINATION/COPY).  When you rename the code-block, those elements get renamed (i.e. COPY_RunMotorA code-block is renamed to RunMotorB, the element automagically changes (again) to RunMotorB.S15).

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Problem with copy/paste whole code-block in Designer.
« Reply #2 on: July 31, 2013, 09:43:39 PM »
Been trying some more. I copy all the rungs and past them to the new code-block.  Works EXCEPT the stage names are the old code-block name.  Coding has come to a halt!

franji1 rings in....

After pasting the rungs maybe just maybe if I rename the block it will rename the stage names.  I bet it won't but will try.

Are there any workarounds?  Maybe I can rename the stages myself.  Should not be too difficult.

Any idea on the 1.1 release date?

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Problem with copy/paste whole code-block in Designer.
« Reply #3 on: July 31, 2013, 10:04:39 PM »
Copy/paste rungs works but renaming stages is required.  I nicknamed only one stage because I don't think it's useful having every stage name unique to the project and renaming stages that are nicknamed adds another bit of confusion.  Doesn't take much for me.

I would like to see STAGE nicknames unique only within the block they are in.  That way you can have START, MIDDLE, END stages in every block if you want.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6169
  • Yes Pinky, Do-more will control the world!
Re: Problem with copy/paste whole code-block in Designer.
« Reply #4 on: July 31, 2013, 10:41:47 PM »
There has been some considerable rework to code block copy and paste in 1.1. Probably not all you want, but much improved.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3837
    • Host Engineering
Re: Problem with copy/paste whole code-block in Designer.
« Reply #5 on: August 01, 2013, 08:20:55 AM »
Copy/paste rungs works but renaming stages is required.
That's fixed too.  If you copy some rungs that contain some references to the code-block's struct members (like Stage Bits), the Paste Options dialog (where you decide what to do with element documentation: don't include/paste doc dest priority/paste doc clip priority) now contains a section on "Inter-Code-Block Struct Field Handling" where you get to choose to replace the clip's code-block struct references with the destination's, or not.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3837
    • Host Engineering
Re: Problem with copy/paste whole code-block in Designer.
« Reply #6 on: August 01, 2013, 08:34:24 AM »
In the mean time, the Replace mechanism is pretty extensive.  You can replace structure RunMotorA with structure RunMotorB and NOT check the Match Exactly checkbox, and select the Where to Replace to a specific code-block.  It's under the menu Search->Replace, or hit Ctrl+R in Edit Mode (yeah, you gotta be in Edit Mode, Ctrl+E, I get nailed by this every once in a while).

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Problem with copy/paste whole code-block in Designer.
« Reply #7 on: August 01, 2013, 11:02:03 AM »
Thanks for the workaround. Looking forward to improvements in Do-more, love it!