combit List & Label 25 - .NET Online Web Help
ValueFromProjectFile Method

combit.ListLabel25 Namespace > ProjectParameter Class : ValueFromProjectFile Method

Full filename (and path) of the project file.

Returns the value of the project parameter in the specified project.

For example the values of the project parameters can be obtained before print start. This is particularly helpful if custom project parameters are declared that can be changed in the Designer by the user (LlProjectParameterVisibility).

Public Function ValueFromProjectFile( _
   ByVal projectFile As String _
) As String
public string ValueFromProjectFile( 
   string projectFile
String^ ValueFromProjectFile( 
   String^ projectFile



Full filename (and path) of the project file.

Return Value

Value of the project parameter as string.

With project parameters that use formulas the formula (not evaluated!) is returned.

Always the project parameter specified in the Name Property is queried.

Below a new project parameter is added and the Designer is called. Afterwards the project parameter - probably by the user in the Designer - is queried.
// Add custom project parameter
string myParamName = "MyParamName";
ProjectParameter myProjectParameter = LL.ProjectParameters.NewParameter(myParamName); 
myProjectParameter.ParameterType = LlProjectParameterType.Value; 
myProjectParameter.Value = "MyParamValue"; 
myProjectParameter.SaveDefaultValue = true;

// Call Designer
string projectFile = @"C:\temp\sample.lst";
LL.Design(LlProject.List, projectFile);

// Query custom project parameter
string myParamValue = myProjectParameter.ValueFromProjectFile(projectFile);
' Add custom project parameter
Dim myParamName As String = "MyParamName"
Dim myProjectParameter As ProjectParameter = LL.ProjectParameters.NewParameter(myParamName)
myProjectParameter.ParameterType = LlProjectParameterType.Value
myProjectParameter.Value = "MyParamValue"
myProjectParameter.SaveDefaultValue = True

' Call Designer
Dim projectFile As String = "C:\temp\sample.lst"
LL.Design(LlProject.List, projectFile)

' Query custom project parameter
Dim myParamValue As String = myProjectParameter.ValueFromProjectFile(projectFile)

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also


ProjectParameter Class
ProjectParameter Members