The following are the miscellaneous functions that are used for a vareity of purposes in COD scripts. In most cases, the syntax can be copied/pasted directly into a file and function properly. They should be edited for your particular use. This allows you to short cut your time by not having to experiment to figure out code syntax.

Please take notice of the following notes…

(a) – Undocumented in prior Autodesk documentation

FunctionNotesExampleReturn Value
breakpoint(a)breakpoint
debugdebug("My Alert Box")
debug "My Alert Box"
n/a
dimdim myvariable
dim myarray as array
dim myarray as array([#])
dim myobject as itemstruct
n/a
error(a)error("Custom Error Message")
error "Custom Error Message"
n/a
execexec("[prog]" , [flags] , "[params]" , "[work dir]")

[prog] = Program to execute
[flags] = exec_default, exec_wait, exec_show_normal, exec_show_max, exec_show_min
[params] = Parameters passed to program
[work dir] = Working directory for program

exec("Notepad.exe", exec_wait+exec_show_min, , "")
includeinclude "C:\\My Script.cod"
inputboxinputbox("Title", "Prompt", "Default"){User entered data}
objectobject [my file] = new file("[file]" , [mode])
object [my file] as file("[file]" , [mode])
output(a)output("Send Message to Console")
output "Send Message to Console"
queryquery("Chose Yes or No")True/False
remRem This is a Noten/a
requiresrequires task
requires task.selection
runrun "C:\\My Script.cod"n/a