I'm trying to group primitives with length more than specified value. For that i used Attribute Wrangle with this VEXpression:
`f@group_t = length({@XMAX-@XMIN,@YMAX-@YMIN,@ZMAX-@ZMIN})<0.5;`
But i'm getting this error message
Warning: Errors or warnings encountered during VEX compile:
/obj/subnet1/frames/attribwrangle1/attribvop1/snippet1: Syntax error, unexpected identifier. (1,28)..
But at this position(1,28) is only middle of the @XMIN attribute and nothing else. And i can't get what's wrong with this.
                    
					
                    
                        
                    
					
						
					
                    VEX Syntax issues
4972 4 1- 
                               
                                
                                
                                
                            
                         - kamanji
 - Member
 - 2 posts
 - Joined: 7月 2017
 - オフライン
 
- 
                               
                                
                                
                                
                            
                         - neil_math_comp
 - Member
 - 1743 posts
 - Joined: 3月 2012
 - オフライン
 
                        The syntax error is because the 
However, that will probably only give the results you're looking for if you have those 6 attributes on your input geometry. If you're looking for the size of the diagonal of the bounding box of a primitive, you can try:
Hopefully that helps.
                    
					
                    
                        
                    
					
						
							{0,0,0}syntax only works for numeric literal values.  You can use the set(0,0,0)syntax instead.However, that will probably only give the results you're looking for if you have those 6 attributes on your input geometry. If you're looking for the size of the diagonal of the bounding box of a primitive, you can try:
f@group_t = length(getbbox_size(0,itoa(@primnum)))<0.5;
Hopefully that helps.
                    
								Writing code for fun and profit since... 2005?  Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
						
					
                    
                    
                https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- 
                               
                                
                                
                                
                            
                         - kamanji
 - Member
 - 2 posts
 - Joined: 7月 2017
 - オフライン
 
- 
                               
                                
                                
 - maya4fun
 - Member
 - 1 posts
 - Joined: 12月 2019
 - オフライン
 
                        -I all I have a problem qith this formula on attrib wrangler:
int pcloud = pcopen(0, "P", @P, 2.1, 10);
if (pcnumfound(pcloud) < 5);
}
removepoint(0, @ptnum);
{
-the report error is :
Invalid source /obj/origin_box/attribwrangle1/attribvop1.
(Error: Syntax error, unexpected '(', expecting identifier or '['. (5,16)).
any help will be apprecited. Thank you.
Emmanuel
					
                    
                        
                    
					
						
					
                    
                    
                int pcloud = pcopen(0, "P", @P, 2.1, 10);
if (pcnumfound(pcloud) < 5);
}
removepoint(0, @ptnum);
{
-the report error is :
Invalid source /obj/origin_box/attribwrangle1/attribvop1.
(Error: Syntax error, unexpected '(', expecting identifier or '['. (5,16)).
any help will be apprecited. Thank you.
Emmanuel
- 
                               
                                
                                
                                
                            
                         - animatrix_
 - Member
 - 5048 posts
 - Joined: 2月 2012
 - オフライン
 
                        Hi,
You have to remove ; after pcnumfound:
                    
					
                    
                        
                    
					
						
							You have to remove ; after pcnumfound:
int pcloud = pcopen(0, "P", @P, 2.1, 10); if (pcnumfound(pcloud) < 5) { removepoint(0, @ptnum); }
								Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
							
						
					
                    
                    
                Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
							- 
                    
- Quick Links
 
 

