Jump to content

Size of Parameter/Record Field


Recommended Posts



Anyone know the maximum size of characters a Parameter/Record field can hold?


Needing a place to store a series of xyz co-ordinates from a user-defined polygon. And thinking to store it in a static text parameter of my pio.

There's no way to foreknow the number of vertices as its userdefined. But the location of each vertex is crucial to my calc.



Link to comment

You are limited to what displays in object info and what you can set in the plug-in's defaults, as well as what you can access via the PParameter constant, but SetRField and GetRField allow unlimited storage.  If in VS, any variables you use must be DYNARRAY OF CHAR and constants are still limited to 256 characters, so varName := 'Something longer than...256 characters'; will throw an error.


For example, place a callout object on the drawing, and select it.  Run the following script:

	i			:INTEGER;
	fieldVal := '';
	FOR i:=1 TO 300 DO BEGIN		
		fieldVal := Concat( fieldVal ,i, Chr( 13 ) );
	SetRField( FSActLayer, 'Callout', 'Text', fieldVal );
	ResetObject( FSActLayer );


You will see the callout displays a string far greater than 256 characters.  Next run the following:

	fieldVal := GetRField( FSActLayer, 'Callout', 'Text' );
	AlrtDialog( Concat( Len( fieldVal) ) );

You can see that fieldVal retrieves a string of 1092 characters.



  • Like 1
Link to comment

Thanks for the input guys, so far so good, following Josh's advice.


1. Have set up a plugin parameter as static text: __xypts; and generated xyz coordinates from the pio and stored it in this static text parameter.

2. Setup a the pio to draw a text object containing data from this hidden static text parameter, and all the data is getting read out beautifully.




can't really go into what the pio does at the moment, but as you can see from the screen shot, all coordinate data is getting displayed from the hidden parameter. Characters I assume are well over 256.


This is using the vs.GetRField call and not the P<parmaname> method.


Link to comment

If you ever run into limits you might look at User Data, but I believe it's SDK only. Still you could write a VS function to handle your implementation.

Basically you can attach (structures of) data to any object handle which is very cool.

I have a junction object that can have unlimited legs, each leg info is dynamically added to the object handle without using a record.


If all you are saving are coordinates you might also consider dynamic controlpoints and or the combination with above.

This also opens the option of simply moving any of those points if the control handle is visible end enabled.

Link to comment

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...