private void GetPackageAttribute(Smartpen pen, string className, out string categoryName, out string groupName, out string groupVersion, out byte isLocked, out byte isPrivate, out string versionString) { try { // Find package foreach (PackageItem item in pen.Packages.Items) { if (item.ClassName == className)// match the class name? { // Get attributes categoryName = item.CategoryName; groupName = item.GroupName; groupVersion = item.GroupVersion; isLocked = item.Locked; isPrivate = item.Private; versionString = item.Version; break; } } } catch (Exception e) { HandleError(e); } } private void SetPackageAttribute(Smartpen pen, string className, string categoryName, string groupName, string groupVersion, byte isLocked, byte isPrivate, string versionString) { try { // Find the package foreach (PackageItem item in pen.Packages.Items) { if (item.ClassName == className)// match the class name? { // Set attributes item.CategoryName = categoryName; item.GroupName = groupName; item.GroupVersion = groupVersion; item.Locked = isLocked; item.Private = isPrivate; item.Version = versionString; // Commit to pen item.Save(); break; } } } catch (Exception e) { HandleError(e); } }