VB scripting help with upvectors and pick sessions 2005-01-04 - By Adam Sale
Back Hey all, Happy New Year... I'm having a wee bit of trouble getting the finishing touches on this upvector script I'm trying to write.
Here is the error I'm getting:
'ERROR : 2000 - Argument 1 (ConnectionSet) is invalid 'ERROR : 2001-EDIT-ApplyOp - Argument 1 is invalid ApplyOp "UpVectorDefiner", "null.kine.pathcns;upvec", siUnspecified, siPersistentOperation 'ERROR : Invalid procedure call or argument: 'ApplyOp' - [line 43]
and here is the code I've got so far:
'Multi Upvector script Jan 05 'Adam Sale 'Script to aid in creating upvector constraints 'for objects that are attached along a path 'usage: objects must be path constrained for this script to work 'select items to upvector and run script 'in the pick session choose the object that is to act as the up vector
<snip> 'declare variables
dim oSel, upVec, button, modifier ,oColl
'create empty collection
set oColl = CreateObject("XSI.Collection")
'get selectionlist
set oSel = getValue("Selectionlist")
'place each item in the selectionlist into collection
for each i in oSel
oColl.add i
next
'use a pick session to choose the upvector object
PickObject "Select UpVector", "Select UpVector", upvec, button, modifier
if modifier = 0 then
'loop through collection and apply the upvector to each item for each oitem in oColl
ApplyOp "UpVectorDefiner", oitem &".kine.pathcns;upvec"
next end if
</snip>
Any ideas where I might be going wrong here? I can't see where I've messed up..
Thanks folks :-)
Adam
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|