j00ey Posted January 4, 2017 Share Posted January 4, 2017 (edited) Can someone demystify the docs for me regarding adding an array attribute with addAttrib? I found an example using addattribute but that's deprecated now and I can't figure out the syntax. I can't do f[]@arrayName; because I need to loop through a number of points and for each point add an empty detail array. This is what the docs say I should use - "int addattrib(int geohandle, string attribtype, string name, float defvalue[]) defvalue provides the default value for the attribute and determines the type of attribute to create. String and array attributes cannot have defaults, so only the type is used in those cases." If anyone knows could you fill in the ***s in this line? I've tried all sorts and nothing works.. Thanks very much addattrib(geoself(), "detail", "test", ***); Edited January 4, 2017 by j00ey Quote Link to comment Share on other sites More sharing options...
j00ey Posted January 4, 2017 Author Share Posted January 4, 2017 (edited) Should always think before posting! I tried doing it in an Attrib VOP and found the correct form. For anyone interested it works like this : addattrib(geoself(), "detail", "test", {}); and for strings this seems to work addattrib(geoself(), "detail", "test", {""}); Edited January 4, 2017 by j00ey extra info Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.