Example #1
0
        public void AddItem(string itemType, string itemID)
        {
            JAM.StartCall();
            IntPtr ptr    = JAM.ToLocaleString(itemType);
            IntPtr ptr2   = JAM.ToLocaleString(itemID);
            int    status = JA_BLOCK_STYLER_SNAP_DIALOG_add_item(base.Handle, ptr, ptr2);

            JAM.FreeLocaleString(ptr);
            JAM.FreeLocaleString(ptr2);
            if (status != 0)
            {
                throw NXException.Create(status);
            }
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }