(05-18-2020 09:28 PM)victorvbc Wrote: [ -> ] (05-18-2020 09:11 PM)anyfoo Wrote: [ -> ]Hi victorbc, I think using the geometry app would be wonderful for this, but I haven't found a way to add objects to it programmatically. Do you know how?
If I'm not mistaken, you can use the Instruction() and DelInstruction() commands. I'll try to find some documentation on that.
Couldn't find anything except for the help menu in the calculator itself, here it is:
Instruction:
The Instruction command provides access to the list of symbolic definitions in the Symbolic view of the Geometry App. Each Symbolic view definition is numbered, with 1 being the first definition.
Instruction(n) returns the value of instruction n (equivalent to typing its name).
Instruction(n,0) returns a textual representation of instruction n.
Instruction(n,1) returns a list containing all the information for instruction n: {name, definition, value, color, visible(0/1), plotDetail (0-7), filled (0/1), traced (0/1), legend visible (0/1), {} or {font, dpi, x, y} text position for sliders and measures, animation data: {} or {animation type (0-3), steps per sec (0-15), pause (0-15), start (real), stop(real), steps(real)}}
Instruction(n, k) returns the kth-1 element from the meta data list, where k is between 2 and 12 inclusive (see above).
Instruction(n):= Sets the value of instruction n from a string.
Instruction(n,1):= sets all instruction data using the same list format as described above.
Instruction(n, k):= sets meta data object k-1 to a specific value, where k is between 2 and 12 inclusive (see above).
if n=0 or if n is greater than the number of current instructions, adds an instruction at the end of the instruction list.
if n<0, inserts an instruction at position -n.
n can also be the variable name, either using 'name' or "name"
DelInstruction:
The DelInstruction command allows you to delete one or more symbolic definitions of geometric objects in Symbolic view. Each Symbolic view definition is numbered, with 1 being he first definition.
DelInstruction erases ALL instructions.
DelInstruction(n) erases instruction n.
DelInstruction(a,b) erases instructions a to b.
Haven't used these in any program of mine, so I don't have any more advice, but this should get you going. Let me know if you can make it work.
Cheers.