SS Manager Objects

Discussion in 'AutoCAD' started by pbherr, May 20, 2004.

  1. pbherr

    pbherr Guest

    I am creating a vb program to set up sheet sets. I can create the sheet set , add subsets, set the location of new sheets, however I can not figure out how to set the template or layout. The documentation is a lacking. I need an example of setting the dwt file path and the layout. If anyone can help it would be great.
     
    pbherr, May 20, 2004
    #1
  2. pbherr

    Ben Rand Guest

    Have you looked at the ..Autocad
    2005\Sample\ActiveX\SheetSetVBA\SheetSetVBA.dvb code? There's a class in
    there called SheetSet, and a method called CreateSheetSet that should help
    with setting the DWT file path.

    For adding a layout, turn to the AddSheet method. Part of the code is copied
    here (my comments are to the right):

    'Create a sheet based on a layout
    Dim layoutRef As New AcSmAcDbLayoutReference

    layoutRef.InitNew SheetSet 'SheetSet is an IAcSmSheetSet object,
    must "initialize" the new layout to the SheetSet

    'Set layout name and file name
    layoutRef.SetName layoutName 'layoutName is the name
    of the drawing's layout
    layoutRef.SetFileName layoutDwgPath 'layoutDwgPath is the path
    to the drawing

    'Import a sheet based on a layout into the category
    Set newSheet = parentCategory.ImportSheet(layoutRef)

    'Now insert the sheet
    parentCategory.InsertComponent newSheet, Nothing

    Hope this helps. If not, post more questions. We track our drawings and
    title information in a database, which we then use to generate transmittal
    letters and stuff. I got stuff hooked up to generate sheets using title
    information stored in the database, and to synch the titles in the whole
    sheet set if they change on the drawings/database.

    Ben Rand
    CAD Manager
    CEntry Constructors & Engineers


    set , add subsets, set the location of new sheets, however I can not figure
    out how to set the template or layout. The documentation is a lacking. I
    need an example of setting the dwt file path and the layout. If anyone can
    help it would be great.
     
    Ben Rand, May 27, 2004
    #2
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.