No, Armando... I wanted to expose it to scrutiny before publishing the source.
The code is UGLY... but it doesn't have to be 'buggy', too! <G>
Actually, I've already discovered something I don't like about it. I never fully exercised the features of the algorithm I started with, until after I'd gotten the UI figured out.
It doesn't do what I think it should. Ideally, if one selects several drawing objects... it should create a stock item that reflects stock for the extents of the drawing objects, not just the one largest (or first) object in the list. And, if one selects several objects for which to create one stock, then it just makes sense that ANY shape should be allowed (but only when multiples are selected), since no single shape will be used to describe the stock -- it will just be an 'extents' stock.
To that end, I'll be altering the routine this evening. Perhaps, also, I'll spend a bit of time 'prettying it up', so my old, rusty 1980's non-structured language skills don't show so glaringly! <G>
THEN I'll publish the source (I promise!)
Lloyd