![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				adding 2D text via script
			 
			
			
			In Vizard 2.53, what is the script equivalent of using 'Add Text' in the Resource box? 
		
		
		
		
		
		
		
		
	
	ie. 'Add Text' -> text name is 'sample text' - how would I do that in code? thanks!  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Hi, 
		
		
		
		
		
		
		
		
	
	Here is sample code to add a text object to the screen. Code: 
	MyText = viz.add(viz.TEXT3D,'Message',viz.SCREEN) MyText.translate(0.5,0.5)  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			is there a way to add 2D text label or text that sticks to one positon on the screen regardless of the viewpoint? 
		
		
		
		
		
		
		
		
	
	for example: in Beginner's Tutorials - adding 2D and 3D text - Stuck to the world: 'White Text' stays in place while 'Yellow Text' moves around due to viewpoint change. How do I add something like 'White Text' via scripts?  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			The code in the previous post does just that. It adds a text object to the screen, then translates it to the center. The text will stay in the same place on screen, no matter where the viewpoint is.
		 
		
		
		
		
		
		
		
		
	
	 | 
![]()  | 
	
	
| Thread Tools | |
| Display Modes | Rate This Thread | 
		
  | 
	
		
  |