Where 1 is the index of the mechanism in the station, can exist more than one depending how your station looks like.
ActiveToolFrame is the one you choosen in the elements toolbar.
You could also use ToolFrames(x) if you want to control which toolframe to use if you have several.
Hi Klaus
The object model in RS5 is totally different from the one in RS4.
Take a look at the vsta example supplied there is a macro for creating targets.
You could also take a look on this topic where I have written some info regarding creating addins for RS5, may give you some hints on the object model (haven’t tested them on RS5.08 but I think the object model haven’t changed since then) http://forums.robotstudio.com/forum_posts.asp?T ID=621&PN=9