DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

GroupCreate problem when group name is a number string

My intention was to modify the Importing Data From Multiple DataPlugin Files.vbs to read in my TDM files.  I'm running into a problem with creating groups based on my TDM file names which are basically date-time stamps.
 
What is happening is that the 2nd CreateGroup and beyond produces a weird negative numbers as the group name. You can see it with this simple script.
 
'-------------------------------------------------------------------------------
'-- VBS script file
'-- Created on 10/23/2007 12:24:41
'-- Author: ---
'-- Comment: ---
'-------------------------------------------------------------------------------
Option Explicit  'Forces the explicit declaration of all the variables in a script.
Call GroupCreate("20071023064949",1)    '... GroupCreateName,TargetGroupIndex
Call GroupCreate("20071023064950",2)    '... GroupCreateName,TargetGroupIndex
Call GroupCreate("20071023064951",3)    '... GroupCreateName,TargetGroupIndex
 
 
 
Is there an issue if group names have numbers in them, or is there a string length maximum??
 
 
 
0 Kudos
Message 1 of 7
(3,984 Views)

Hello!

Isn't it amazingSmiley Wink. I ran in some similar strange problems with the GroupNameChk command. I expect that GroupCreate uses GroupNameCheck internaly. I suppose it is caused by the attempt to find an unique group name (but it still exist if you switch off this 'feature'). This also affects the GroupName and GroupPropSet commands. From my point of view a big bug in DIAdem 10.2.

Because of different issues with these commands starting in DIAdem 9.1 I had to wrap all these functions in a script and load this as an user command extension. As far as I know is there for your special problem no good solution, only a workaround: Just add a character e.g. a '_' at the end of every group name and cut it off if you want to use the group name later. If you need the real name in a report you can write it in a custom property of the group. Perhaps it will be fixed in the SP?!

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 7
(3,976 Views)
Hi jsmalley,

this maybe a problem if you have only long numbers as name for groups or channels. The current check algorithm for unique names causes it. But there is a very simple way to prevent this problem. Please go to "Settings" >> "Options" >> "General" and choose one of the "Unique group and channel names" "Separators" except "NONE".

Then it should work fine.

Greetings
Walter
0 Kudos
Message 3 of 7
(3,974 Views)
Good Morning Walter!
 
I had tried the 'UniqueNameSep ="None"' and this doesn't solved the probems. Do I miss there something?
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 4 of 7
(3,967 Views)
Hello Matthias,

I said ... except "NONE" ... this means do not use "NONE".

Greetings
Walter
0 Kudos
Message 5 of 7
(3,965 Views)
You're so right. Sorry!
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 6 of 7
(3,961 Views)


@Walter Rick wrote:
Hi jsmalley,

this maybe a problem if you have only long numbers as name for groups or channels. The current check algorithm for unique names causes it. But there is a very simple way to prevent this problem. Please go to "Settings" >> "Options" >> "General" and choose one of the "Unique group and channel names" "Separators" except "NONE".

Then it should work fine.

Greetings
Walter


Thanks. That makes sense.

I changed to an underscore and it works fine. Even adding groups directly into the portal (right click add group) works this way.

 


 

0 Kudos
Message 7 of 7
(3,950 Views)