News:

  • October 18, 2026, 07:26:05 PM

Login with username, password and session length

Author Topic: Element Documentation Export Improvements  (Read 10667 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Element Documentation Export Improvements
« on: February 17, 2021, 09:44:49 PM »
UDT elements that are referenced indirectly do not export. I'm having to recreate a lot of tags to get them into C-More. Example:

MYUDT[ I].ELEMENTX
MYUDT[J].ELEMENTX
MYUDT[K].ELEMENTX

Where I=0, J=1, K=2. It would be nice if these would export as:

MYUDT0.ELEMENTX
MYUDT1.ELEMENTX
MYUDT2.ELEMENTX

Bolt

  • Hero Member
  • *****
  • Posts: 598

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Element Documentation Export Improvements
« Reply #2 on: February 18, 2021, 12:43:45 AM »
Thanks Bolt. That saves me a lot of grief. What's weird is that the Nickname can be the same as the structure element itself and DmD doesn't give a fault but when the tags are exported like this a "`" is prepended to the tag name. What's also weird is that for some of the tags in C-More you don't have to type the "`" but for some of them you do. 

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Element Documentation Export Improvements
« Reply #3 on: February 18, 2021, 08:52:50 AM »
UDT elements that are referenced indirectly do not export. I'm having to recreate a lot of tags to get them into C-More. Example:

MYUDT[ I].ELEMENTX
MYUDT[J].ELEMENTX
MYUDT[K].ELEMENTX

Where I=0, J=1, K=2. It would be nice if these would export as:

MYUDT0.ELEMENTX
MYUDT1.ELEMENTX
MYUDT2.ELEMENTX

It looks like you just want a range, vs. multiple random entries?  Entering by hand multiple random entries (e.g. I=0, J=1, K=2) requires nearly as much work as copy/paste a line of text in the export file and tweaking the ID.  A range, however, can dump 10, 100, 1000 C-more tags very easily by just providing a start/end ID.

Basically, if an array reference is found, you could be prompted to provide a range for that specific block element, whether it's MyUDT or R or C (e.g. MyUDT[V42].ElementX, R[V2], C[V55]).  If it's a structure/UDT, I'm guessing that you would want the identical range for ALL structure members (e.g. for .ElementX and for .MyFlag and for .ElementA), or do you think you want to be prompted for a range for EVERY SINGLE structure member (i.e. once for .ElementX, once for .Myflag, and a 3rd time for .ElementA - realize a log or recipe UDT could easily have 20+ members).

At some point, notepad becomes the optimal way of editing a text file to your exact needs.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Element Documentation Export Improvements
« Reply #4 on: February 18, 2021, 09:25:12 AM »
I think what Bolt and I were both after is to automatically export all elements of all instances of a memory block defined by a UDT:

MyUDT[ I].elementx, .elementy, .elementz...
MyUDT[J].elementx, .elementy, .elementz...
.
.
.

MyUDT[Last Instance].elementx, .elmenty, .elementz...

Maybe a popup that has all of the user created memory blocks with a tick box. Applying the tick does as shown above? This was my use case anyway. At least there's a work around for it.




                   
« Last Edit: February 18, 2021, 09:27:07 AM by RBPLC »

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Element Documentation Export Improvements
« Reply #5 on: February 18, 2021, 10:16:43 AM »
Thanks Bolt. That saves me a lot of grief. What's weird is that the Nickname can be the same as the structure element itself and DmD doesn't give a fault but when the tags are exported like this a "`" is prepended to the tag name. What's also weird is that for some of the tags in C-More you don't have to type the "`" but for some of them you do.

You're welcome.  I also found this "`" phenomenon maddening, I stopped trying to figure it out and just went with it.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Element Documentation Export Improvements
« Reply #6 on: February 18, 2021, 10:17:56 AM »
I think what Bolt and I were both after is to automatically export all elements of all instances of a memory block defined by a UDT:

MyUDT[ I].elementx, .elementy, .elementz...
MyUDT[J].elementx, .elementy, .elementz...
.
.
.

MyUDT[Last Instance].elementx, .elmenty, .elementz...

Maybe a popup that has all of the user created memory blocks with a tick box. Applying the tick does as shown above? This was my use case anyway. At least there's a work around for it.
               

Yes, I approve of RBPLC's suggestions.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Element Documentation Export Improvements
« Reply #7 on: February 18, 2021, 10:22:22 AM »
I get the structure member request, but not sure why you need array indexes like I, J, K.  Would it be NON-array indexes that are hard coded IDs?

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Element Documentation Export Improvements
« Reply #8 on: February 18, 2021, 10:46:49 AM »
In my instance, the use of indices is a workaround to not having AOI (not really being indirectly referenced in the typical sense). If you hard code in MyUDT0, MyUDT1 etc., you cannot use Replace to do batch replacement of all the instances. Being indirectly referenced (in my case I is Nickname for V0, J is Nickname for V1, etc. with V0=1, V1=1, etc.) allows the use of the Replace tool to do the batch replacement.