One hates to be all necromantic 'n' stuff but...
symbolName = 'My Light'
hNew = vs.CreateCustomObject('Lighting Device', (-61,-7.55), 0)
vs.Move3DObj(hNew, 0, 0, 11.5)
vs.SetRField( hNew, 'Lighting Device', 'Symbol Name', symbolName)
vs.ApplyLightInfoRecord(vs.GetObject(symbolName), hNew)
vs.SetRField( hNew, 'Lighting Device', 'Pan', '-7')
vs.SetRField( hNew, 'Lighting Device', 'Tilt', '46')
vs.ResetObject(hNew)
doesn't appear to be working exactly, yet.
Don't get me wrong, you've got me this far and I am very grateful, and any problems are on my end.
So when I run my script (including a nice little snippet of code I *ahem* 'borrowed' to populate a popup box) I only get simple boxes. There's lighting data attached, but it's all at default values.
The problem:
The script doesn't create the correct graphical symbol
The script doesn't add the correct lighting instrument information
Part of it is wrapping my head around how VW works with 'intelligent' symbols. In AutoCAD, a block is a graphical object that has a data attached (in the form of attributes).
As far as I can see, a VW 'lighting device' (and similar) is a data that has a graphical symbol attached.
My thinking is to get a reference to the definition of the lighting device, then extract the references to the symbol and data:
LuminaireList, LuminaireCount = vs.BuildResourceList(16, 0, "")
deviceHandle = vs.GetResourceFromList(LuminaireList, 0)
symbolName = str(vs.GetRField(deviceHandle, 'Symbol Name'))
Am I heading in the right direction?