set pg [getSelectedPGroup] if {$pg==0}\ { bell post3DEInfoRequester " \n Error, there is no Pointgroup selected. \n" return } set filename [post3DEFileRequester "Import OBJ Point Cloud..." "*"] if {$filename!=""}\ { set file [open $filename r+]; while {![eof $file]} {\ # get a line out of file... set string [gets $file]; # "parse" string... if {[lindex $string 0]=="AddNullObject"} {\ # create new point... set point [createPoint $pg]; set name [lindex $string 1]; setPointName $pg $point $name; # skip 4 lines... gets $file; gets $file; gets $file; gets $file; # read position... set string [gets $file]; set pos3d [lrange $string 0 2] setPointPosition3D $pg $point $pos3d setPointSurveyType $pg $point SURVEY_EXACT print3DEConsole "point " $name " created: " $pos3d "\n"; flush3DEConsole; } } close $file }