I posted this question and i got perfect answer. Code is still working but i want to upgrade rule. I wish to remove more then "-" from part number. I need one more character to remove. (".")I beleive it is not to hard . Here is code
If booleanParam = True Then
Dim PartNumber As String = iProperties.Value("Project", "Part Number")
iProperties.Value("Custom", "Program") = PartNumber.Replace("-", "")
Else
booleanParam = False
iProperties.Value("Custom", "Program") = ""
Thank you
Solved! Go to Solution.
Solved by rjay75. Go to Solution.
Just add the same type of replacement you have the the "-". You can 'chain' them together.
If booleanParam = True Then
Dim PartNumber As String = iProperties.Value("Project", "Part Number")
iProperties.Value("Custom", "Program") = PartNumber.Replace("-", "").Replace(".","")
Else
booleanParam = False
iProperties.Value("Custom", "Program") = ""