.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My jig rotate doesn't look as good as Rotate

4 REPLIES 4
Reply
Message 1 of 5
yaqiz
685 Views, 4 Replies

My jig rotate doesn't look as good as Rotate

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

4 REPLIES 4
Message 2 of 5
quigs
in reply to: yaqiz

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.

My name is Martin.. 😄
Message 3 of 5
yaqiz
in reply to: quigs

Thanks very much Martin, it works

 

Do you know where I can find system variable list?

 

Thanks again

Message 4 of 5
quigs
in reply to: yaqiz

You could use:  "sysvdlg" to get a full list with explanations.

My name is Martin.. 😄
Message 5 of 5
mohnston
in reply to: yaqiz

I use the helpful information on this awesome site.

They also have a command list.

CAD Programming Solutions

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost