DataRepository.GetIdentifier.1.vbs Example

Applies To

DataRepository.GetIdentifier method

Description

This example demonstrates how to use the DataRepository.GetIdentifier method.

Code

NewScene , false
set oDatabase = XSIUtils.DataRepository
set oCube = CreatePrim( "Cube", "MeshSurface" )
Application.LogMessage oDatabase.GetIdentifier( oCube )
Application.LogMessage oDatabase.GetIdentifier( oCube, siObjectGUID )

' Select an object out of model and in a model
SelectObj "Views.ViewA.UserCamera.camera,Cube,Scene_Root"
set oSelection = Application.Selection
for each oItem in oSelection
	Application.LogMessage oItem.name & " has ID " & oDatabase.GetIdentifier( oItem , siModelIdentifier )
	Application.LogMessage oItem.name & " has ID " & oDatabase.GetIdentifier( oItem )
next
'INFO : 60
'INFO : {76BD459D-0C6F-4AC6-8489-1F0AD4E31079}
'INFO : Camera has ID -1
'INFO : Camera has ID 97
'INFO : cube has ID 416
'INFO : cube has ID 60
'INFO : Scene_Root has ID 416
'INFO : Scene_Root has ID 416

Related Examples

DataRepository.GetIdentifier.2.js

Keywords

DataRepository GetIdentifier


Autodesk Softimage 2011