cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

How to assign a variable to a string

Here is the example using arguments that assign a column property to a map role. 

 

col<<Set Property( "Map Role", Map Role( Shape Name Use( "filepath to data table", "column name" ) ) );

 

 

I want to get the file path automatically and fill in to the "filepath to data table" in the arguments above. 

And this is how I get the path of the file:

 

Logo_Name = Pick FIle();
Logo_Name_File = Open(Logo_Name);
LogoPath = Logo_Name_File << Get Path();

And below doesn't work for me. 

:Measure points<<Set Property( "Map Role", Map Role( Shape Name Use( LogoPath , "Name" ) ) );

 

How can I fill in the "file path to data table " with the LogoPath variable?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to assign a variable to a string

 See if this works for you

Logo_Name = Pick File();
Logo_Name_File = Open( Logo_Name );
LogoPath = Logo_Name_File << Get Path();
Eval(
	Substitute(
			Expr(
				:Measure points << Set Property( "Map Role", Map Role( Shape Name Use( __logop__, "Name" ) ) )
			),
		Expr( __logop__ ), logoPath
	)
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to assign a variable to a string

 See if this works for you

Logo_Name = Pick File();
Logo_Name_File = Open( Logo_Name );
LogoPath = Logo_Name_File << Get Path();
Eval(
	Substitute(
			Expr(
				:Measure points << Set Property( "Map Role", Map Role( Shape Name Use( __logop__, "Name" ) ) )
			),
		Expr( __logop__ ), logoPath
	)
);
Jim

Re: How to assign a variable to a string

Thank you so much! It works for me !