public static void DeleteUserAttributes(this NXObject obj, NXOpen.NXObject.AttributeType type, Update.Option option) { //JAM.StartCall(); //int status = JA_NXOBJECT_delete_user_attributes(obj.Tag, type, option); //if (status != 0) //{ // throw NXException.Create(status); //} obj.DeleteAllAttributesByType(type, option); }
public static void DeleteUserAttribute(this NXObject obj, NXOpen.NXObject.AttributeType type, string title, bool deleteEntireArray, Update.Option option) { //JAM.StartCall(); //IntPtr ptr = JAM.ToText(title); //int status = JA_NXOBJECT_delete_user_attribute(obj, type, ptr, deleteEntireArray, option); //JAM.TextFree(ptr); //if (status != 0) //{ // throw NXException.Create(status); //} obj.DeleteAttributeByTypeAndTitle(type, title, option); }
public string[,] GetAttributeStrings() { NXOpen.NXObject.AttributeInformation[] userAttributes = this.NXOpenDisplayableObject.GetUserAttributes(); int length = userAttributes.Length; string[,] strArray = new string[length, 3]; for (int i = 0; i < length; i++) { NXOpen.NXObject.AttributeType type = userAttributes[i].Type; string title = userAttributes[i].Title; strArray[i, 0] = type.ToString(); strArray[i, 1] = title; strArray[i, 2] = "Nothing"; switch (type) { case NXOpen.NXObject.AttributeType.Null: strArray[i, 2] = ""; break; case NXOpen.NXObject.AttributeType.Integer: strArray[i, 2] = this.GetIntegerAttribute(title).ToString(); break; case NXOpen.NXObject.AttributeType.Real: { double realAttribute = this.GetRealAttribute(title); strArray[i, 2] = Snap.Number.ToString(realAttribute); break; } case NXOpen.NXObject.AttributeType.String: strArray[i, 2] = this.GetStringAttribute(title); break; case NXOpen.NXObject.AttributeType.Time: strArray[i, 2] = this.GetDateTimeAttribute(title).ToString(); break; } } return(strArray); }
public void DeleteAttributes(AttributeType type, string title) { NXOpen.NXObject.AttributeType type2 = (NXOpen.NXObject.AttributeType)type; this.NXOpenDisplayableObject.DeleteUserAttribute(type2, title, true, Update.Option.Now); }
public void DeleteAttributes(NXOpen.NXObject.AttributeType type, string title) { this.NXOpenPart.DeleteUserAttribute(type, title, true, Update.Option.Now); }
public static NXOpen.NXObject.AttributeInformation GetUserAttribute(this NXObject obj, string title, NXOpen.NXObject.AttributeType type, int index) { return(new NXObject.AttributeInformation()); }