Any way to propogate the Font sizes to multiple sheets?

Discussion in 'SolidWorks' started by BEN EADIE, Feb 9, 2005.

  1. BEN EADIE

    BEN EADIE Guest

    I have had a change in format and need to change the font size for dims,
    note, bom's..... anyway to have this go through multiple files and do it for
    me?

    Ben
     
    BEN EADIE, Feb 9, 2005
    #1
  2. BEN EADIE

    Rock Guy Guest

    I believe there is a macro at this site that will allow you to copy
    document settings from one file to another.

    http://swtools.cad.de/


    It may work for you.
     
    Rock Guy, Feb 9, 2005
    #2
  3. BEN EADIE

    BEN EADIE Guest

    If anyone cares I found a macro on the net that does what I need, I modified
    it to my needs and the text for the macro is below.

    Now if I could just figure out how to use the task scheduler to run this on
    multiple files... I have read the help in 2004 for running a macro on
    several files using the task manager, but it was not making sense to me at
    the time. Ill give 2005 another try, but any hints would be appreciated.

    the macro is below

    Cheers
    Ben

    ----------------------------------------------------------------------------
    ---------------------------------
    Sub main()

    Dim Now As Boolean
    Dim StdFont As Object




    Set swApp = Application.SldWorks ' Attach to SolidWorks
    Set Document = swApp.ActiveDoc ' Get active document

    If Not Document Is Nothing Then ' A Document is open
    FileTyp = Document.GetType ' Get document type
    If FileTyp = swDocDRAWING Then ' If it is a drawing
    continue else skip ahead
    SheetNames = Document.GetSheetNames

    '*********** Set new defaults for Font settings on all annotation types
    **************************



    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingDetailTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "20"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingDetailTextFormat, StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingBalloonTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "18"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingBalloonTextFormat, StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingDimensionTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "18"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingDimensionTextFormat,
    StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingNoteTextFormat)
    StdFont.TypeFaceName = "Century GOthic"""
    StdFont.CharHeightInPts = "20"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingNoteTextFormat, StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingGeneralTableTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "18"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingGeneralTableTextFormat,
    StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingSectionTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "20"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingSectionTextFormat, StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingSurfaceFinishTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "18"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingSurfaceFinishTextFormat,
    StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingWeldSymbolTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "18"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingWeldSymbolTextFormat,
    StdFont)

    Set StdFont =
    Document.GetUserPreferenceTextFormat(swDetailingViewArrowTextFormat)
    StdFont.TypeFaceName = "Century GOthic"
    StdFont.CharHeightInPts = "20"
    Now =
    Document.SetUserPreferenceTextFormat(swDetailingViewArrowTextFormat,
    StdFont)
    End If
    End If
    End Sub
     
    BEN EADIE, Feb 10, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.