iLogic pdf print problem

iLogic pdf print problem

erik
Contributor Contributor
499 Views
6 Replies
Message 1 of 7

iLogic pdf print problem

erik
Contributor
Contributor

Hello!

I have made a set of rules to create drawing sets. But i have a problem with my iLogic rule when it comes to generate pdf prints. The drawing sets consists of 3 or 4 sheets. The first sheet is ok, but on sheet 2, 3 and 4 some of the lines becomes almost invisible?

Someone who know what might be the problem? 

0 Likes
500 Views
6 Replies
Replies (6)
Message 2 of 7

mcgyvr
Consultant
Consultant

If you save to pdf not using ilogic do you get the same issue?

If not can you post your ilogic code and maybe a sample drawing and pdf showing the issue,etc...

The more data you provide the better your chances of a useful answer..



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 3 of 7

erik
Contributor
Contributor

Thanks for answer.

If I save to pdf "manually", the print is ok, but then I miss some auto-generated file name.

Here are my print rule:

Sub Main()
	Dim oAsmDoc As AssemblyDocument
	oAsmDoc = ThisApplication.ActiveDocument
	oAsmName = Left(oAsmDoc.DisplayName, Len(oAsmDoc.DisplayName) -4)
		
	Dim PDFAddIn As TranslatorAddIn
        Dim oContext As TranslationContext
	Dim oOptions As NameValueMap
	Dim oDataMedium As DataMedium
	
	Call ConfigurePDFAddinSettings(PDFAddIn, oContext, oOptions, oDataMedium)
	
	oPath = ThisDoc.Path
	oFolder = "Q:\Dokumenter\art"
	
		'- - - - - - - - - - - - -Top Level Drawing - - - - - - - - - - - -
	Dim oAsmDrawingDoc As DrawingDocument
	oAsmDrawingDoc = ThisApplication.Documents.Open(ThisDoc.ChangeExtension(".idw"), True)
	oAsmDrawingName = iProperties.Value("Summary", "Subject")

	On Error Resume Next
		oDataMedium.FileName = oFolder & "\" & oAsmDrawingName & ".pdf"
		Call PDFAddIn.SaveCopyAs(oAsmDrawingDoc, oContext, oOptions, oDataMedium)
		oAsmDrawingDoc.Close
	
End Sub
Sub ConfigurePDFAddinSettings(ByRef PDFAddIn As TranslatorAddIn, ByRef oContext As TranslationContext, ByRef oOptions As NameValueMap, ByRef oDataMedium As DataMedium)

	oPath = ThisDoc.Path
	PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
	oContext = ThisApplication.TransientObjects.CreateTranslationContext
	oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
	oOptions = ThisApplication.TransientObjects.CreateNameValueMap
	oOptions.Value("All_Color_AS_Black") = 0
	oOptions.Value("Remove_Line_Weights") = 0
	oOptions.Value("Vector_Resolution") = 400
	oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange
	oOptions.Value("Custom_Begin_Sheet") = 1
	oOptions.Value("Custom_End_Sheet") = 3

	oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
	
	
End Sub
0 Likes
Message 4 of 7

erik
Contributor
Contributor

This is a screen shot from first sheet:

 
 

Merknad 2020-03-06 153345.jpg

 

Second sheet:

 

Merknad 2020-03-06 153541.jpg

0 Likes
Message 5 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @erik 

 

I would try changing the "Remove_Line_Weights" option to 1.

 

Note too that programming questions of this type are generally better suited for the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

I've asked the moderators to move this thread to that forum for you.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 6 of 7

erik
Contributor
Contributor

Hi.

I have tried to set the "Remove_Line_Weights" option to 1. There was no difference.

Thanks for your help.

0 Likes
Message 7 of 7

Darkforce_the_ilogic_guy
Advisor
Advisor

I have seens problem like this without using ilogic... This it happen if you run it again ?

 

It happen form time to time ... But as far as I know it always fix that problem it you regen the PDF