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


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).

Syntax
'Declaration
 
Public Function ValueFromProjectFile( _
   ByVal projectFile As String _
) As String
public string ValueFromProjectFile( 
   string projectFile
)
public:
String^ ValueFromProjectFile( 
   String^ projectFile
) 

Parameters

projectFile

Full filename (and path) of the project file.

Return Value

Value of the project parameter as string.
Remarks

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

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

Example
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;
LL.ProjectParameters.Add(myProjectParameter);

// 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
LL.ProjectParameters.Add(myProjectParameter)

' 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)
Requirements

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

See Also

Reference

ProjectParameter Class
ProjectParameter Members