HOW TO CONTROL 'LINE' PRIMITIVE IN XPRESSION

Hi everyone,

There is a primitive called LINES in xpression. How can i manuplate the x, y & z numbers of the ‘points’ inside the lines thru external data? in other words how can i control the x, y & z numbers externally thru datalinq?

Gaurav

Yes you will find references in the SDK how to control them.

I have an example here that animates, I cannot give you the project as it belongs to a client but here is a script I wrote.

OnOnline

dim Lines1, Lines2 as xpLinesObject
dim count, tally as xpTextObject

self.GetObjectByName(“Lines1”, Lines1)
self.GetObjectByName(“Lines2”, Lines2)
self.GetObjectByName(“Tally”, tally)

tally.Text = “1”

Lines1.SetCurrentList(0)
Lines1.ClearCurrentList

Lines2.SetCurrentList(0)
Lines2.ClearCurrentList

this was on a Scene Director script

dim Lines1, Lines2 as xpLinesObject
dim count as xpTextObject

scene.GetObjectByName(“Lines1”, Lines1)
scene.GetObjectByName(“Lines2”, Lines2)
scene.GetObjectByName(“Count”, count)

dim c as integer = count.Text

dim tPoint, ctPoint as xpTextObject

dim x as integer = 1180 / c
dim y as integer = 10

Lines1.SetCurrentList(0)

Lines1.ClearCurrentList

Lines1.BeginUpdate()
Lines1.AddPoint(0, 1000, 0, 5)
dim i as integer
for i = 1 to c
scene.GetObjectByName(“tTicket” & i, tPoint)
dim t as integer = tPoint.Text
engine.DebugMessage(tPoint.Text, 0)
Lines1.AddPoint(ix, ty, 0, 5)
Next
'Lines1.AddPoint((c+1)*x, 0, 0, 5)
Lines1.EndUpdate()

Lines2.SetCurrentList(0)

Lines2.ClearCurrentList

Lines2.BeginUpdate()
Lines2.AddPoint(0, 1000, 0, 5)
for i = 1 to c
scene.GetObjectByName(“ctTicket” & i, ctPoint)
dim t as integer = ctPoint.Text
Lines2.AddPoint(ix, ty, 0, 5)
Next
'Lines2.AddPoint((c+1)*x, 0, 0, 5)
Lines2.EndUpdate()

Thanks Simon, will work on it and get back if i am facing any issues.