Hi All,
I create a jig rotate followed example code I found
http://au.autodesk.com/ama/images/media/CP122-2L-Hands-On-Jigging-Creating-Jigs-using-VBdotNET.pdf
and changed 2 functions
Protected Overrides Function Sampler(ByVal prompts As JigPrompts) As SamplerStatus Dim myPPR As PromptPointResult myPPR = prompts.AcquirePoint(myOpts) Dim curPos As Point3d curPos = myPPR.Value If curPos.IsEqualTo(BasePt) Then Return SamplerStatus.NoChange Else myMatrix = Geometry.Matrix3d.Displacement( _ BasePt.GetVectorTo(myPPR.Value)) Dim pt1 As New Point2d(BasePt.X, BasePt.Y) Dim pt2 As New Point2d(myPPR.Value.X, myPPR.Value.Y) BaseRo = pt1.GetVectorTo(pt2).Angle End If Return SamplerStatus.OK End If End Function Protected Overrides Function Update() As Boolean myBRef.Rotation = BaseRo Return False End Function
But the result is very flickering,I would like to create the same effect as command 'Rotate' in CAD.
Any sugesstion or tips?
Thanks
If flickering is your problem, them add these 2 lines just before you call your jig in the command class:
Application.SetSystemVariable("dragp1", 2000)
Application.SetSystemVariable("dragp2", 2000)
Hope that helps, as it helped me.
Cheers,
Martin.
I use the helpful information on this awesome site.
They also have a command list.