Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5788

HistoryRecording In VBScript

$
0
0

@Vahab wrote:

Hi,
What I am trying to do in the following code is to deform an extruded Object (Polygon Based) by means of History Recording.
That means any upcoming changes to the polygon results in the deformation of the extrusion as well.
However, unlike the the initial polygon, the extruded surface maintains it previous form.
Any ideas what is missing?
Thanks in advance;
Here is the Code:

 Call Main()
 Sub Main()

	Dim strObject,cpoint,m,intcount

	strObject = Rhino.addPolygon(rhino.WorldXYPlane, 10, 6)

        If Not IsNull(strObject) Then

         	Rhino.EnableHistoryRecording True
	        Rhino.EnableObjectGrips strObject

	        Rhino.ExtrudeCurveStraight strObject, array(0, 0, 20)
		m = Rhino.ObjectGripLocation(strObject, 5)
	        m(0) = m(0) + 5
     		m(1) = m(1) + 0
      		m(2) = m(2) + 0
        	Rhino.ObjectGripLocation strObject, 5, m

 	End If

End Sub

Posts: 8

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5788

Trending Articles