Follow Up:
I just wanted to come back with a follow up to the above comments , in case anybody else ends up here and wants to consider using ProBoolean as an alternative - Don't waste your time!
I was test porting my scripts over to ProBoolean today, and it is just awful and clearly not supported from a scripting point of view.
I used denisT's code on the links that Swordslayer supplied as a starting point - really interesting, I learnt a lot at least - sadly the definitions seem to have changed since then, but after some fiddling I got a working version for max 2018. It may be of use to someone else and save them some time, so i'll dump that here.
But yeah, on top of that, there is a whole bunch of other missing features from the documentation, if they exist I have no idea how to find them.
- Cant select an operand by number
- Cant extract an operand
- Cant delete an operand
- Cant get the number of operands in the boolean
Some of these you could perhaps get around with a similar method as the 'Add Method' button click trick, but it is a lot of dodgy code and risk of things going wrong in the best case scenario, so just not worth the risk for me past here.
I will just have to live with the missing feature on Boolean 3 and hope it gets sorted one day - Haha, It is very hard to have any faith in Autodesk after just implementing workarounds to bugs on ProBoolean that have been around for almost 10 years without being corrected though...
Thanks again to SwordSlayer for his help, and goodluck to anyone who finds themself here in the future with the same issues. 🙂
Main Code by denisT - sept '09 - https://forums.cgsociety.org/t/what-wrong-with-my-proboolean-maxscript/1359245
hwnd_keyword = "*Boolean*"
fn getBooleanHWND =
(
-- for c in (windows.getChildrenHWND #max) while hwnd == undefined where c[5] == hwnd_keyword do -- OLD CODE
for c in (windows.getChildrenHWND #max) while hwnd == undefined where (matchPattern (c[5] as string) pattern: hwnd_keyword ignoreCase:true) do
(
hwnd = UIAccessor.GetParentWindow c[1]
)
hwnd
)
fn setAddMethod method hwnd: update:on =
(
if hwnd == unsupplied do hwnd = getBooleanHWND()
if hwnd != undefined do
(
name = case method of
(
0: "Reference"
1: "Copy"
2: "Move"
3: "Instance"
default: "Copy"
)
if (bt = windows.getChildHWND hwnd name) != undefined do UIAccessor.PressButton bt[1]
if update do select selection
ok
)
)
setAddMethod 3