06-27-2007 02:38 PM
06-28-2007
12:35 AM
- last edited on
06-26-2024
11:02 AM
by
Content Cleaner
Hi,
You can try this example, http://zone.ni.com/devzone/cda/epd/p/id/3606
I know its a version 2.01 but it should still apply.
There is a CVI version and probably a labVIEW version on the NI website.
Regards
Ray Farmer
06-28-2007 09:26 AM
PropertyObjectFile[] typeFiles = MyEngine.GetTypePaletteFileList();
PropertyObjectFile typeFile = typeFiles[0];
TypeUsageList typeList = typeFile.TypeUsageList;
string whyNotValid = typeList.ValidateNewTypeName(name, false, out isValidName);
if (!isValidName)
return null;
PropertyObject newType = MyEngine.NewPropertyObject(PropertyValueTypes.PropValType_Container, false, "", 0);
newType.NewSubProperty("MyNum", PropertyValueTypes.PropValType_Number, false, "", 0);
newType.SetValNumber("MyNum", 0, 123.0);
newType.NewSubProperty("MyStr", PropertyValueTypes.PropValType_String, false, "", 0);
newType.SetValString("MyStr", 0, "AA");
newType.Name = name;
typeList.InsertType(newType, 0, TypeCategories.TypeCategory_CustomDataTypes);
typeFile.IncChangeCount();
typeFile.SaveFileIfModified(false);
06-28-2007 09:38 AM
That's great, thanks for the feedback
Regards
Ray Farmer