Origin Page has Long Name and Short Name just like Origin Columns have Long Name and Short Name. Historically (pre 8.0 days), these were referred to as Name and Label. Additionally, Short Names are treated like a variable name and have a length restriction of 24 characters.
Any attempt to name (Short Name) an object with more than 24 characters will trigger some internal code that truncates the name. There is some internal code which also looks at the end of a name so I think what happens here is that Origin decides the name needs to be shorter and that '3' is more important than '0' so the '0' gets dropped.
The Name methods deal exclusively with Short Name. The Long Name is the Label (string) property of a page. Here is how you might re-write your example:
string name1 = "AB_CDEFG05_2006020100003"; printf("%s\n", name1); gp.SetName(name1); // This 'attempts' to set the Short Name gp.Label = name1; // Set the Long Name string name2 = gp.GetName(); string label1 = gp.Label; printf("%s, %s\n", name2, label1);
}
The lesson here should be : any time you set a name, check to make sure you know what the name is really going to be.