I have created several skill procedures that draw cutom paths. The problem is that I don't see a preview while drawing the path, only a rubberbanding path with always has a with of 1.
Idealy, I would see a preview while adding points to the path (like in the Create Path and create Multipart path functions).
I hear you think, why don't you just make a multipart path template, but I want to use an options form to set different parrameters instead of having a huge list with template flavors.
If you are using enterPath to draw your rubber banding path, then you can use changeEnterFun to change the width value on this enter function. By default, the changeEnterFun will cancel the current enter function and start the new one, but if you store off your points using an addPointProc, then you can have the changeEnterFun pick up the points that have already been entered.
The first argument would be 'enterPath, the rest of the arguments would be the same as those you gave to the original enterPath call, except of course you would change the width and pass in some points if you want.
In reply to dmay:
Thanks for the info, but that doesn't really do what i want it to do.
Maybe using a rubberbandingpath isn't the best way.
Any idea how I can get a preview of what I'm drawing, like when creating a path or a mp path?
In reply to RVERP:
You don't have quite as much control when using the public API (some things are only possible from the C level too). You should contact customer support to request the ability to do this with justification as to what is different about what you're trying to do from the built-in capability.
I think Derek is right. if you are using enterPath then you should be able to update the rubberband preview as you like. below is an example
procedure( createBuschangeStat() changeEnterFun( 'enterPath ?prompts list("Enter Points","Enter next Point") ?form BusForm ?points prevPoints ?addPointProc "ListPrevPts" ?delPointProc "ListPrevPts" ?doneProc "DlgLayCreateBus" ?pathWidth BusForm~>busWidth~>value ?cmdName "bbbb" ) t )
this is just the callback procedure in a createBus skill. the rubberband width is defined by the ?pathWidth which is kept updated everytime a user changes one of the input (for example width of wire or spacing between wires of a bus channel).
The cmdName "bbbb" I have used to avoid nesting of enterfunction, in-case user hits the assigned bindkey several times.
I hope this helps.
In reply to lrlsk:
Ok, I think I will use this one.