PDF File generated from macro is "type 30" file
PDF File generated from macro is "type 30" file
(OP)
Hi! Ferdo,
I used the catscript (from chm file) of converting cat drawing into pdf file & runned a macro, but the pdf file generated is showing as "type 30" file & not pdf.
I am following the same instructions like i have copied my all the cat drgs in C:temp folder.
Can you please provide some solution ?
Regards,
Himanshu
I used the catscript (from chm file) of converting cat drawing into pdf file & runned a macro, but the pdf file generated is showing as "type 30" file & not pdf.
I am following the same instructions like i have copied my all the cat drgs in C:temp folder.
Can you please provide some solution ?
Regards,
Himanshu





RE: PDF File generated from macro is "type 30" file
Can you post here the macro (because there are several solutions) and some details about your CATIA version used for that operation?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: PDF File generated from macro is "type 30" file
Below is the script:
Language="VBSCRIPT"
Sub CATMain()
MsgBox "This will not turn in black your background view and at the end the drawing will be closed with last save done manually"
Dim theDrawing As DrawingDocument
Set theDrawing = CATIA.ActiveDocument
Dim mySelection As Selection
Set mySelection = theDrawing.Selection
mySelection.Search "Type=*,scr"
Set visPropertySet1 = mySelection.VisProperties
visPropertySet1.SetRealColor 0,0,0,0
mySelection.Clear
theDrawing.ExportData "C:\temp\" & "\" & Left(CATIA.ActiveDocument.Name, Len(CATIA.ActiveDocument.Name) - 11), "pdf"
theDrawing.Close
End Sub
The CATIA Version i use is CATIA V5 R20 SP6
Regards,
Himanshu
RE: PDF File generated from macro is "type 30" file
I am sorry for my highlighting the script.
Please find below again
Language="VBSCRIPT"
Sub CATMain()
MsgBox "This will not turn in black your background view and at the end the drawing will be closed with last save done manually"
Dim theDrawing As DrawingDocument
Set theDrawing = CATIA.ActiveDocument
Dim mySelection As Selection
Set mySelection = theDrawing.Selection
mySelection.Search "Type=*,scr"
Set visPropertySet1 = mySelection.VisProperties
visPropertySet1.SetRealColor 0,0,0,0
mySelection.Clear
theDrawing.ExportData "C:\temp\" & "\" & Left(CATIA.ActiveDocument.Name, Len(CATIA.ActiveDocument.Name) - 11), "pdf"
theDrawing.Close
End Sub
Regards,
Himanshu
RE: PDF File generated from macro is "type 30" file
theDrawing.ExportData "C:\temp\" & "\" & Left(CATIA.ActiveDocument.Name, Len(CATIA.ActiveDocument.Name) - 11), "pdf"
Why don't you use the build in CATIA command to save as pdf? Do you have some special reasons?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: PDF File generated from macro is "type 30" file
A bunch of cat drawings at a time of around 20 to 30 are need to be saved in PDF. That's why i selected to go for a macro.
Regards,
Himanshu
RE: PDF File generated from macro is "type 30" file
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: PDF File generated from macro is "type 30" file
Can you please explain me the "string manipulation" for this macro ? How did to choose to edit this figure ?
If i want this macro to be edited for batch mode, how should i edit this script ? Please give any hints ?
Meanwhile, i am also thinking on that, it's not like i had simply left it on you.
Regards
Himanshu
RE: PDF File generated from macro is "type 30" file
For what you need is not quite necessary to run in batch mode but you need to think how to open each catdrawing from their location and save as pdf in a loop.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...