×
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!

*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

Add Watermark to SW Drawings

Add Watermark to SW Drawings

Add Watermark to SW Drawings

(OP)
I have searched online and this questions seems to be asked many times, without a really good solution.

Is there any good (efficient) way to add a watermark to SW drawings - to be able to mark a print as 'Draft' or 'Preliminary' when saving it as a pdf?

In searching, the only solution I found is to 'Edit Sheet', place a text note, and select behind sheet.

This works good for a single sheet, but I have several drawings with 10+ drawing sheets that I need to add this to. I can't go into each sheet one at a time and add the note, only to delete it soon after when the drawing is released for real.

I was hoping there was something like in MS Word, where you just click to add a watermark, type what you want, and it appears on every sheet.


Thanks and Happy Holidays!

RE: Add Watermark to SW Drawings

Are you use a PDM system? I know with PDM Pro you can use a variable to determine what is shown in such a note and set the variable to blank when the part is going through the approval process. Creating the PDF can then be automated as part of the approval process as well.

You could do the same thing manually. Setup a variable in the drawing template file properties. You can then the note like you are talking about but you set the print as the variable. Then when you change the variable it will update all the sheets.

RE: Add Watermark to SW Drawings

GRF is correct. in PDM pro you can make that happen. If you don't have it then it's a manual operation. You can run it through the custom properties of the drawing if you want to, but it still has to be manually maintained.

Scott Baugh, CSWP pc2
CAD Systems Manager
Evapar

www.evapar.com

Quote:

"If it's not broke, Don't fix it!"
FAQ731-376: Eng-Tips.com Forum Policies

RE: Add Watermark to SW Drawings

You can create a macro to create a note on all the sheets, print, then remove the notes.
Try this:

CODE -->

Option Explicit
Sub main()
    Dim swApp As SldWorks.SldWorks
    Dim swModel As SldWorks.ModelDoc2
    Dim swDraw As SldWorks.DrawingDoc
    Dim swSheet As SldWorks.Sheet
    Dim swNote As SldWorks.Note
    Dim swAnn As SldWorks.Annotation
    Dim swTextFormat As SldWorks.TextFormat
    Dim swView As SldWorks.View
    Dim swExportPDFData As SldWorks.ExportPdfData
    Dim SavePath As String
    Dim sheetNames As Variant
    Dim sheetName As Variant
    Dim boolstatus As Boolean
    Dim longstatus As Long
    Dim shtProps As Variant

    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swDraw = swModel
    sheetNames = swDraw.GetSheetNames
    '------ insert note on each sheet ------
    For Each sheetName In sheetNames
        boolstatus = swDraw.ActivateSheet(sheetName)
        Set swSheet = swDraw.GetCurrentSheet
        shtProps = swSheet.GetProperties
        swDraw.EditTemplate
        swModel.ClearSelection2 True

        Set swNote = swModel.InsertNote("<FONT color=0x000000ff>DRAFT")
        If Not swNote Is Nothing Then
            swNote.LockPosition = False
            boolstatus = swNote.SetBalloon(0, 0)
            Set swAnn = swNote.GetAnnotation()
            If Not swAnn Is Nothing Then
                longstatus = swAnn.SetLeader3(swLeaderStyle_e.swNO_LEADER, 0, True, False, False, False)
                Select Case shtProps(0)
                    Case swDwgPaperSizes_e.swDwgPaperCsize
                        boolstatus = swAnn.SetPosition(0.15, 0.15, 0)
                    Case swDwgPaperSizes_e.swDwgPaperBsize
                        boolstatus = swAnn.SetPosition(0.25, 0.2, 0)
                    Case Else
                        boolstatus = swAnn.SetPosition(0.1, 0.1, 0)
                End Select
                Set swTextFormat = swModel.GetUserPreferenceTextFormat(0)
                swTextFormat.Bold = True
                swTextFormat.Escapement = 0.4
                swTextFormat.CharHeight = 0.04
                boolstatus = swAnn.SetTextFormat(0, False, swTextFormat)
            End If
        End If
        swModel.ClearSelection2 True
        swModel.EditTemplate
        swModel.EditSheet
    Next
    '------ print ------
    Set swExportPDFData = swApp.GetExportFileData(1)
    swExportPDFData.ViewPdfAfterSaving = True
    SavePath = swModel.GetPathName
    SavePath = Left(SavePath, Len(SavePath) - 6) & "PDF"
    boolstatus = swModel.Extension.SaveAs(SavePath, 0, 0, swExportPDFData, 0, 0)
    '------ remove notes ------
    For Each sheetName In sheetNames
        boolstatus = swDraw.ActivateSheet(sheetName)
        Set swView = swDraw.GetFirstView
        Set swNote = swView.GetFirstNote
        Do While Not swNote Is Nothing
            If swNote.GetText = "DRAFT" Then
                Set swAnn = swNote.GetAnnotation
                boolstatus = swAnn.Select3(False, Nothing)
                swModel.EditDelete
            End If
            Set swNote = swNote.GetNext
        Loop
    Next
End Sub 

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! Already a Member? Login


Resources

eBook - The Future of Product Development is Here
Looking to make the design and manufacturing of your products more agile? For engineering and manufacturing organizations, the need for digital transformation of product development processes just became more urgent than ever so we wanted to share an eBook that will help you build a practical roadmap for your journey. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close