NXGrunt
Mechanical
- Oct 27, 2008
- 6
Hi,
I am beating my head against a wall trying to get the Journal I am using to export PDFs to set the line widths.
See Code snippet below, The variable 'thinLineWidth' is a Boolean. If it is true I get the correct thin line output from the PDF. If it is false, I should get the custom three widths but the output PDF does not change.
I did record a few journals while exporting a few PDFs to analyze the code there and I don't see what could be missing. Other than widthDefinition1.Use is set to 0 for single width and 1 for custom three widths. I have tried including it in the code but I get no change to the output.
The log file shows all the variables are set to the correct values.
Help Please!
I am beating my head against a wall trying to get the Journal I am using to export PDFs to set the line widths.
See Code snippet below, The variable 'thinLineWidth' is a Boolean. If it is true I get the correct thin line output from the PDF. If it is false, I should get the custom three widths but the output PDF does not change.
I did record a few journals while exporting a few PDFs to analyze the code there and I don't see what could be missing. Other than widthDefinition1.Use is set to 0 for single width and 1 for custom three widths. I have tried including it in the code but I get no change to the output.
The log file shows all the variables are set to the correct values.
Help Please!
Code:
'Set Custom Widths
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(0).Width = 0.252
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(0).Name = "PDF Custom Normal"
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(1).Width = 0.42
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(1).Name = "PDF Custom Thick"
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(2).Width = 0.08
printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(2).Name = "PDF Custom Thin"
If _thinLineWidth Then
lg.WriteLine(" PDF Output Set to Thin Line Width")
printPDFBuilder1.Widths = PrintPDFBuilder.Width.SingleWidth
printPDFBuilder1.CreateWidthDefinition().SingleSource = 2
Else
lg.WriteLine(" PDF Output set to Custom Three Width")
printPDFBuilder1.Widths = PrintPDFBuilder.Width.CustomThreeWidths
End If
lg.WriteLine(" Single Source: " & printPDFBuilder1.CreateWidthDefinition().SingleSource.ToString)
lg.WriteLine(" Custom Width(2) size: " & printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(2).Width.ToString)
lg.WriteLine(" Custom Width Name(2): " & printPDFBuilder1.CreateWidthDefinition().GetCustomWidths(2).Name.ToString)
lg.WriteLine(" Widths: " & printPDFBuilder1.Widths.ToString)
lg.WriteLine(" ThinLineWidth: " & _thinLineWidth.ToString)