#wrong object name?
18-Apr-95 16:53:13
Sb: #wrong object name?
Fm: Tim c Branan 76360,540
To: Jonas Ruikis [ADESK] 73172,1351
I have been attempting to incorportate the select.k3d script into my
move script and it almost works, except I seem to have an object name
wrong or something. I am not exactly sure how to fix it, but I am
99.9% certain it is a simple fix.
The error I get when I run it comes after it has asked me to select
the XYZ point file and which objects I want to move (with the tag
object dialog box), the it runs for a few seconds, then spews the
following message:
Object ' ' does not exist
In Line 47, statement 1
see the line with three * for which line it is referring to.
Below is the scripts as I have modified them. Everything below it in the script
is just the select.k3d script with no changes.
*******************************************************************************
**
DefPosition ObjectPosition
DIM Selected_Objects$(3000,32)
Ext$(0)= "XYZ"
Selectfile "Select XYZ node file", "", ""
If RC < 1 Then End
' a file of x,y,z data
;open "\3ds4\scripts\treetest.asc", input, #50
Open FileName$, INPUT, #50
;
' all of the selected objects get stuffed into the array called
Selected_Objects$…
;PickObjects "Please Pick Objects", Selected_Objects$, NT_OBJECT
;
;
;
; This first part is a demo driver for routines ChooseNodeExp, PickObjectsExp
PWindow 25, 40, 40, 5
gosub InitObjTag : gosub SortObjTag
;Filter=NT_SELECTED-1 : for i=1 to 10 : NodeNumber=i : gosub ObjTagNum : next i
;gosub ChooseNodeExp : if RC > 0 then GFX_Continue "Chosen Node: "+NodeName$
Filter=NT_TAGSET+NT_OBJECT : gosub ObjTagAll
gosub PickObjectsExp : if RC <1 then end
for i=1 to RC
NodeNumber=i : gosub GetSelectedObject
; GFX_Continue "Chosen Node #"+Str$(i)+": "+NodeName$
next i
if RC = 0 then end
total_objects_selected = RC
ObjectPosition.time = 0
ObjectPosition.tens = 25
ObjectPosition.cont = 25
ObjectPosition.bias = 25
ObjectPosition.easeTo = 0
ObjectPosition.easeFrom = 0
for i = 0 to total_objects_selected-1 step 1
input #50, x,y,z
' when you hit an end of file, numeric variable default to 0, while string
variable default to NULL, ie ""
if x = 0 and y = 0 and z = 0 then i = 10000: goto next_i
ObjectPosition.x = x
ObjectPosition.y = y
ObjectPosition.z = z
*** CreateKey Selected_Objects$(i), ObjectPosition ***< this line gives
the error
@next_i
next i
end
****************************************************************************