public TaggedObject[] GetSelectedObjects() { int num; JAM.StartCall(); IntPtr zero = IntPtr.Zero; int status = JA_BLOCK_STYLER_SELECT_PART_FROM_LIST_get_selected_objects(JAM.Lookup(base.Tag), out num, out zero); if (status != 0) { throw NXException.Create(status); } return((TaggedObject[])JAM.ToObjectArray(typeof(TaggedObject), num, zero)); }
//public static NXOpen.GeometricUtilities.BoundingObjectBuilder CreateBoundingObjectBuilder(this NXOpen.Part obj) //{ // IntPtr ptr; // JAM.StartCall("solid_modeling"); // int status = JA_PART_create_bounding_object_builder(obj.Tag, out ptr); // if (status != 0) // { // throw NXException.Create(status); // } // return (NXOpen.GeometricUtilities.BoundingObjectBuilder)NXObjectManager.Get(JAM.Lookup(ptr)); //} public static NXOpen.Section[] GetSections(this NXOpen.Features.Feature obj) { int num; JAM.StartCall("solid_modeling", "cam_base"); IntPtr zero = IntPtr.Zero; int status = JA_FEATURE_get_sections(obj.Tag, out num, out zero); if (status != 0) { throw NXException.Create(status); } return((NXOpen.Section[])JAM.ToObjectArray(typeof(NXOpen.Section), num, zero)); }
private void initMessage() { IntPtr ptr; JAM_decode_error(this.m_status, out ptr); if (ptr == IntPtr.Zero) { this.m_message = base.Message; } else { this.m_message = JAM.ToStringFromLocale(ptr, false); } }
public static NXOpen.BlockStyler.SnapBlockDialog CreateSnapDialog(this NXOpen.UI ui, string dialogName) { IntPtr ptr2; JAM.StartCall(); IntPtr ptr = JAM.ToLocaleString(dialogName); int status = JA_UI_MAIN_create_snap_dialog(ptr, out ptr2); JAM.FreeLocaleString(ptr); if (status != 0) { throw NXException.Create(status); } return(new SnapBlockDialog(ptr2)); }
public string Add(string itemType, string itemTitle, string itemValue) { IntPtr ptr4; JAM.StartCall(); IntPtr ptr = JAM.ToLocaleString(itemType); IntPtr ptr2 = JAM.ToLocaleString(itemTitle); IntPtr ptr3 = JAM.ToLocaleString(itemValue); int status = JA_BLOCK_STYLER_SNAP_DIALOG_add(base.Handle, ptr, ptr2, ptr3, out ptr4); JAM.FreeLocaleString(ptr); JAM.FreeLocaleString(ptr2); JAM.FreeLocaleString(ptr3); if (status != 0) { throw NXException.Create(status); } return(JAM.ToStringFromLocale(ptr4)); }
private void lstAllFiles_Drop(object sender, DragEventArgs e) { string[] droppedFiles = (string[])e.Data.GetData(DataFormats.FileDrop, false); // don't ask, I'm tired now if (droppedFiles.Length == 1 && droppedFiles[0].Length >= 4 && droppedFiles[0].Substring(droppedFiles[0].Length - 4, 4).ToUpper() == ".JAM") { current = JAM.Read(droppedFiles[0]); ReloadFile(); return; } foreach (string fileName in droppedFiles) { FileInfo f = current.FindFile(Path.GetFileName(fileName)); if (f != null) { f.ReplaceWithFile(fileName); } } ReloadFile(); current.Export(); }
public FileInfo(JAM container) { Container = container; }
public void SetSelectedObjects(TaggedObject[] objectVector) { JAM.StartCall(); int status = JA_BLOCK_STYLER_SELECT_PART_FROM_LIST_set_selected_objects(JAM.Lookup(base.Tag), objectVector.Length, JAM.ToTagArray(objectVector)); if (status != 0) { throw NXException.Create(status); } }