I know how to set a rotation parameter if I know the name of the parameter, but, what if I don't know it?
Here's my situation. I have a block which has three nested blocks. Each nested block is tied to a rotation parameter. These parameters haven't been named, they only have the generic names given to them from AutoCAD, Angle1, Angle2 & Angle3. I want to be able to set the rotation angle with lisp. My hope is to allow the user to select the nested block and then input an angle and the parameter associated with the nested block will be set. This way the user would just click, select some preset angles via Dynamic Input and away we go. Click, Click, Done.
My problem comes from being able to get the rotation parameter from just a pick.
My first thought was to use something like NENTSEL get the nested block. Then find the rotation parameter that's associated with it. This would be the best way if possible. I cannot figure out how to do that.
Then I thought about trying to find the parameter based on it's origin and a transform matrix from the pick point, via a search of some sort that would return the nearest parameter. That most likely won't work if there are more than one of the parameters near that point, I might get the wrong one.
Since I can get all of the rotation parameters, my next thought was to have the user cycle through them, trying out each one until they found the one they needed. And that probably would take longer that manually setting the rotation angle.
What does the collective say?
Thanks,
Rabbit