×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PDF File generated from macro is "type 30" file

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

RE: PDF File generated from macro is "type 30" file

(OP)
Hi!

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

(OP)
Hi!

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

Play a little bit with the line bellow by replacing 11 with 10 or 12 (or other figures) and see what is going on (try to understand how string manipulation is working).

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

(OP)
Hi!

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

(OP)
Ferdo, figure 10 works out for me.Thanks....

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources