I wanted to know the
type of objects i have selected. say if i selected a instance, it
should print "instance selected" or "path selected".
For this i have tried
a code. unfortunately i couldn't able to finish it.
if( name == "inst"
printf("Instance not selected")
can anyone suggest me the error or correct way to get the above task.
d_selSet = car( geGetSelSet( ) )if( d_selSet~>objType == "inst" then printf( "Instance selected\n" )else printf( "Instance not selected\n" ))
In reply to Bernd:
Thanks Bernd. Hope i can do the same to find the other types of item(say path or polygons etc..)
In reply to bharath2k4er:
Consider 'geGetSelSet' takes a list of elements, you can have more than on element selected.l_selSet = geGetSelSet( )x_elemsInList = length( l_selSet )cond( ;; one object is selected go and print which object type ( onep( x_elemsInList ) ;; pick the first and only element from the list of selected sets d_selSet = car( l_selSet ) ;; distinguish between object types and print case( d_selSet~>objType ( "inst" printf( "Instance selected\n" ) ) ( "path" printf( "Path selected\n" ) ) ( t printf( "Other object selected\n" ) ) ) ;; close case ) ( zerop( x_elemsInList ) printf( "No object is selected!\n" ) ) ( t printf( "More than one object is selected!\n" ) )) ;; close cond