I want to draw some lines but I want them disapear after a move or regen or something else, but not with jig. Something like emulating jig. Is that possible and how? Is it a trick with thse
Is it called non-database-resident object? If so, how can I make it?
Something like parametrizing the draw method using parameters form - not from an Editor.drag() sampler.
I want to redraw an object based on form options and after making the desired options - draw it for real.
Solved! Go to Solution.
I will reply to myself in case someone else runs across this problem. I solved it that way :
1 ) Created a Form with which I pick all the settings needed for my custom object.
2 ) Created a class that contains my REDRAW() method that draws the object I want with dependence to the settings from the form
3 ) Created a structure with which I pass the settings from the Form to the class.
4 ) I make an instance of the form in the top left.
5 ) OnEvent (whatever event you want - radio button, numeric drop down, etc.) I get the data from the form and send it to the REDRAW() method in order to redraw my object with the new settings.
6 ) I keep all the drawable objects ( polylines, arcs, dimension lines, leaders, etc. ) in ObjectCollections, so I can delete them when I call REDRAW or modify them accordingly to the settings.
7 ) When the object satisfies me - I press OK and the object remains in the database.
8 ) If I press Cancel I use the object collection to remove the objects from the DB.
In other words -
1. make a form with which you gather your settings from the user,
2. make a class that instantiates the form and has a object collection to contain your custom object details (polys, arcs, lines etc)
3. and a dredraw() method in the class that accepts the settings (struct) and draws your object OnEvent (Any suitable event)
The visual effect is that my custom object gets redrawn every time I change a thing in my form and that form do not close, but sits still on the left leaving me to see my changes on the fly!
Its like transient graphics ( jig like ) with a form acting like a dynamic object - constructed and redrawn on every change in the form.
If somebody is interested and wants an example - I will make for him a simple one and will post it. For now I will not, because I don`t see interest on the topic.
I would be interested in seeing the code you came up with. If it works the way I suspect it does from your description, I have an idea or two in which such a feature would come in handy.
So, I woud be grateful if you could share some of your code on this.
The example is in SHP.sample.zip. I have removed only the content of the draw method. This is a beta version of one of our functions. We make unfoldings of 2D and 3D sheet profiles. This is a sample from a sheet profile generator. Other functions work similiar to this.
Here is a short movie of what the program actualy does. You can make whatever this way. We prefer making stuff this way, because dynamic blocks with lots of properties are too hard to make and consume much time to edit. We look for objects that have steps in the way they are constructed and then we automate them.
Here we have an example of Unfolding of a 3D or 2D sheet profile that has 3 steps - constructing it directly from poly (SHP.example) from poly, unfolding with bend decution or K-factor method (3D or 2D), and then we place a leader with different specs - paintable area in square meters, linear weight, etc.
Secondly we separete the input from the drawing process and using outside math library we can port our algorithm to other platforms - Rhino, Ares, AutoCAD, Zw, Gstar... whatever.
We have discovered that this is the best way that satisfies our need and ofcourse given our demands to modify classes, reuse parts of code, make similar interface for all our funx.
I suppose that this will be a good technique for other programmers and will save the day sometimes.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register