Showing results for
Do you mean
Solved!

# Where is feVectorRotate in help section?

Hello,

I could not find the Application Object feVectorRotate, which according to "Whats New in FEMAP 11.1.1" says a new function has been added.

Can anybody help?

Thank you.

2 REPLIES
Solution
Solution
Accepted by topic author arjslayer
‎08-26-2015 04:32 AM

## Re: Where is feVectorRotate in help section?

This command appears to have missed the docs, it's pretty straight forward, it rotates a vector, by an angle, about another vector.  The last two arguments return the rotated vector's new base and direction - here's a small example that rotates a vector located at 1.0, 1.0, 1.0 with a direction of 1.0, 1.0, 0.0 about the global z-axis.  It returns the rotated vector and displays using User Defined Graphics the initial vector and the rotated one -

The HTML Clipboard

```Sub Main
Dim App As femap.model
Set App = feFemap()

Dim v1_Base(2) As Double
Dim v1_Dir(2) As Double
Dim CSys0Base(2) As Double
Dim GlobalZAxis(2) As Double

Dim dAngle As Double

Dim newBase As Variant
Dim newDir As Variant

v1_Base(0) = 1.0
v1_Base(1) = 1.0
v1_Base(2) = 1.0

v1_Dir(0) = 1.0
v1_Dir(1) = 1.0
v1_Dir(2) = 0.0

CSys0Base(0) = 0.0
CSys0Base(1)= 0.0
CSys0Base(2) = 0.0

GlobalZAxis(0) = 0.0
GlobalZAxis(1) = 0.0
GlobalZAxis(2) = 1.0

Dim GFX_Vector As femap.GFXArrow
Set GFX_Vector = App.feGFXArrow

GFX_Vector.x = v1_Base(0)
GFX_Vector.y = v1_Base(1)
GFX_Vector.z = v1_Base(2)

GFX_Vector.dX = v1_Dir(0)
GFX_Vector.dY = v1_Dir(1)
GFX_Vector.dZ = v1_Dir(2)

GFX_Vector.Length = 1.0

GFX_Vector.setID = 1

GFX_Vector.color = 24580

GFX_Vector.layer = 1

rc = GFX_Vector.Put( GFX_Vector.NextEmptyID )

rc = App.feVectorRotate( v1_Base, v1_Dir, 30,CSys0Base, GlobalZAxis, newBase, newDir )

GFX_Vector.x = newBase(0)
GFX_Vector.y = newBase(1)
GFX_Vector.z = newBase(2)

GFX_Vector.dX = newDir(0)
GFX_Vector.dY = newDir(1)
GFX_Vector.dZ = newDir(2)

rc = GFX_Vector.Put( GFX_Vector.NextEmptyID )

App.feGFXEnableView( True, 1 )

App.feGFXSelect( 1, True, True )

End Sub```

## Re: Where is feVectorRotate in help section?

Thank you masherman!