Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Sheet set template file - er-associating multiple layouts

  1. #11
    I could stop if I wanted to
    Join Date
    2008-03
    Posts
    383
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    Quote Originally Posted by buddy.brooks View Post
    Archie.manza,

    Perhaps you are correct. I will need to look at it closer and try a few things. For my particular situation, I need to copy the information that is in the current sheet set properties to a new sheet set with a new name that has the same initial data. The placeholder fields seem to link to the proper fields, but the data is not carried forward.

    For instance; The drawing number for each layout sheet is a unique nimber based upon the type of data on each sheet it follows this format
    For the layout tab that has the vicinity map data the tab name is 02 VICINITY MAP 1-1
    the drawing number will be like this:

    XXXX-PROJECT NAME-VM-2-A

    Project # - PROJECT NAME - Vicinity Map - 2 of x - rev A
    XXXX - PROJECT NAME - VM - 2 - A

    WHere the Floor plan number would look like this:
    XXXX-PROJECT NAME-FP-3-A

    Project # - PROJECT NAME - Floor Plan - 3 of x - rev A
    XXXX - PROJECT NAME - FP - 2 - A


    We wanted to keep this data in the sheet properties but it gets lost everytime we create a new file. Unless we re-associate the sheet properties "expected layout" for each sheet which takes forever one at a time for 150 sheets. It would help if there were a VBA script that would cycle through the sheet properties and re-associate each sheet after channging the name. I have found code to cycle through the sheet set and change properties but I have not been able to learn what the variable is for the "expected layout". If I could find that then I think that I could write the code to go through the collection and update the file to the new name. That way we could keep the data that is recorded on in the sheet properties.

    Or maybe I just need to learn how to use the placeholder fields correctly.

    Bud
    Yes you are right. The problem would be the new sheet creation. I can only suggest that you make a Template and add the Project Name, Project Number etc on the Custom of the Drawing Properties. Then use this Template in New Sheet creation. The only thing you have to revise is the Drawing Properties Custom Tab.

    ...Or the VBA code that you have in mind.
    Attached Images Attached Images

  2. #12
    Member buddy.brooks's Avatar
    Join Date
    2006-03
    Location
    Lynchburg Virginia
    Posts
    38
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    archie.manza,

    That doesn't help much I may as well just put the information on the title block and update it everytime. If I could find a way to programatically cycle through the sheet set and update the "expected layout" field for each sheet's properties then I would not have an issue. I suspect that there is an easy way to do this but I haven't found it yet.

    I can cycle throught the sheet set
    I can list the properties
    I can change some properties

    I do not know what the variable name is for the "expected Layout" path
    When I manually change this variable everything works fine.

    It's not so much a matter of doing it, as doing it quickly and transparently. My users will become frustrated if I throw too many steps at them. Also, if the tool I program is too complex, they will have no desire to use it. They will simply continue to update each path manually. I believe that there is an easier, faster way. I just need to properly identify the variable and how to properly change it.
    My goal is to offer them a better simpler solution.

  3. #13
    I could stop if I wanted to
    Join Date
    2008-03
    Posts
    383
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    Okay try this... Everything is on the SHEET CREATION TEMPLATE. Make a template with a Title Block just what you have right now. Then as what you've said, your Format is Project Number - Project Name - Sheet Title - Sheet Number - Revision Number.

    Open your Template (This should be used on the Sheet Creation Template).

    on the Project Number - insert field of Current Sheet Set Project Number
    Project Name - should be Current Sheet Set Project Name
    Sheet Title - insert field Current Sheet Title
    Sheet Number - You can include this on the Sheet Title on the Sheet Set Properties or When creating New Sheets. Example, for Vicinity Map type the Sheet title and Sheet Number as VM-1
    Revision Number - This should be included on the Sheet Set Properties. Add a custom and name it as a Revision Number = value. When inserting this on the Template chose filed of Current Sheet Set Custom and type the Revision Number (exactly what you have specified on the Custom Sheet Set Properties).

    For Template you should see somehting like this (see attachment Template.jpg)
    For Sheet (see attachment VM-1.jpg)

    Now that you have a Template you do not need to replace the Fields. You just have to Right-click on the Sheet Set then edit its Properties.

  4. #14
    Member buddy.brooks's Avatar
    Join Date
    2006-03
    Location
    Lynchburg Virginia
    Posts
    38
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    archie.manza,

    I can do that without any problem but it doesn't really solve my problem. With this solution I now have to insert a minimum of 30 layout templates and edit each one. If I save the template with 30 as my creation template then everytime I open a new dwg I get all 30 whether I want them or not. I need to keep my new drawing template at 1 sheet.

    If I use the template with more than one layout tab, I have the same problem. I can etransmit the file to a new directory but the minute I change the name of the file, I have to re associate all of the "expected layout" paths. If there were a way to etransmit, archive or save as a new name without having to reassociate every sheet, I would be in business.

    Because you have to edit each sheet properties after creation and re enter the drawing number, I do not think that your solution will be any quicker than manually reassociating the files.

    The issue of distinguishing sheet type (VM, IP, FO) and designating standard 1 of 1, 2of 3, etc for 30 sheets is intimidating at best. we have over 100 different possible sheet designations with combinations of 1-6 sheets 1 of 6, 2 of 6, etc.

    I would be better off just putting the drawing number hard coded in the title block of each sheet type and then inserting the templates one at a time. But once again, this defeats the use of using prerecorded data in the sheet properties which is where we would gain the most benefit.

    What I really could use is a simple vb script that would cycle through the sheet list and update the "expected layout" field. something like:

    Code:
    Private Sub ChangeProperties() '(sProperty As String, sValue As String, ByVal oSheet As AcSmSheet)
        Dim propval As New AcSmCustomPropertyValue
        Dim bag As IAcSmCustomPropertyBag
        Dim sProperty As String
        Dim sValue As String
        Dim oSheet As AcSmSheet
        
        
          Dim ssMgr As IAcSmSheetSetMgr
          Set ssMgr = New AcSmSheetSetMgr
       
          Dim mgrIter As IAcSmEnumDatabase
          Set mgrIter = ssMgr.GetDatabaseEnumerator
      
          Dim dbCur As IAcSmDatabase
          Set dbCur = mgrIter.Next
      
          Dim aSheetSet As IAcSmSheetSet
      
          Do While Not dbCur Is Nothing
            Set aSheetSet = dbCur.GetSheetSet
            ThisDrawing.Utility.Prompt vbCrLf & aSheetSet.GetName
            ThisDrawing.Utility.Prompt vbCrLf & dbCur.GetFileName
            Set aSheetSet = Nothing
            Set dbCur = mgrIter.Next
          Loop
      
      'Set mgrIter = Nothing
      'Set ssMgr = Nothing
       Set oSheet = dbCur.GetSheetSet
          
        
        'set oSheet = AcSmSheet.
        Set bag = oSheet.GetCustomPropertyBag
        PropFlag = CUSTOM_SHEET_PROP   ????????????????? < Expected layout here?
        
        propval.InitNew bag
        propval.SetFlags PropFlag
        propval.SetValue sValue
        bag.SetProperty sProperty, propval
        Set propval = Nothing
        Set bag = Nothing
    'Dim ssMgr As IAcSmSheetSetMgr
    Set ssMgr = New AcSmSheetSetMgr
    Dim db As IAcSmDatabase
    Dim dbIter As IAcSmEnumDatabase
    Set dbIter = ssMgr.GetDatabaseEnumerator
    Set db = dbIter.Next 'gets the first sheet set database from the sheet set manager
    
    'before changing data...
    Call db.LockDb(db)
    
    'now write code to change data ???????????????????? 
    
    'on completion...
    Call db.UnlockDb(db)
    
    
    End Sub
    or
    Code:
    Private Sub LoopThroughSheets(ByVal compEnum As IAcSmEnumComponent)
        Dim comp As IAcSmComponent
        Set comp = compEnum.Next()
        ' loop through till the component is Nothing
        Do While Not comp Is Nothing
            ' if the component is a sheet, then...
            If comp.GetTypeName = "AcSmSheet" Then
                Dim s As AcSmSheet
                Set s = comp
                Debug.Print "  Sheet: " & s.GetName
                
                ChangeProperties "Expected layout", CurrentFilePath, s
                
                ' Debug.Print s.GetLayout.GetFileName
            ' if the componnet is a subset then ...
            ElseIf comp.GetTypeName = "AcSmSubset" Then
                Dim sset As AcSmSubset
                Set sset = comp
                ' loop through all the sheets.
                Call LoopThroughSheets(sset.GetSheetEnumerator)
            End If
            ' next
            Set comp = compEnum.Next()
        Loop
    End Sub
    Except I do not know what to put in for:

    ChangeProperties "Expected layout", CurrentFilePath, s

    I can test the code on Custom properties easily enough but I cannot find documentation that tells me how to change the "Expected layouts"

    Bud

  5. #15
    I could stop if I wanted to
    Join Date
    2008-03
    Posts
    383
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    Quote Originally Posted by buddy.brooks View Post
    The issue of distinguishing sheet type (VM, IP, FO) and designating standard 1 of 1, 2of 3, etc for 30 sheets is intimidating at best. we have over 100 different possible sheet designations with combinations of 1-6 sheets 1 of 6, 2 of 6, etc.
    No Bud, Because you are the one who will assign Sheet Numbers and Sheet Type. You can enter 1 of 1, 1 of 2 etc. on the Sheet Number when you are creating new sheets. If you insisting using VBA Code, try the Programming Forum.

  6. #16
    Member buddy.brooks's Avatar
    Join Date
    2006-03
    Location
    Lynchburg Virginia
    Posts
    38
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    archie.manza,

    You are correct, I could enter 1 sheet at a time but that too is a lenghty process when entering 30 or more sheets. I could have a template for each sheet type and just manually import the template from a layout.

    You are also correct that in order to do what I am trying to do I will probably have to use VB. I was hoping there was some setting or something that would allow me to save drawing and sheet set under a new name without loosing the contents of the sheet properties.

    I will try the programming forum.

    If there is a moderator following this thread who would like to move it to the VBA forum please let me know otherwise I will start a new thread.

    Thanks everyone for your help.

    Bud

  7. #17
    I could stop if I wanted to
    Join Date
    2008-03
    Posts
    383
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    Quote Originally Posted by buddy.brooks View Post
    archie.manza,

    You are correct, I could enter 1 sheet at a time but that too is a lenghty process when entering 30 or more sheets. I could have a template for each sheet type and just manually import the template from a layout.

    You are also correct that in order to do what I am trying to do I will probably have to use VB. I was hoping there was some setting or something that would allow me to save drawing and sheet set under a new name without loosing the contents of the sheet properties.

    I will try the programming forum.

    If there is a moderator following this thread who would like to move it to the VBA forum please let me know otherwise I will start a new thread.

    Thanks everyone for your help.

    Bud
    Good Luck Bud! hope you could find an answer.

  8. #18
    Active Member
    Join Date
    2008-08
    Posts
    54
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    [QUOTE=RobertB;905049]Are you using placeholder fields in the template?

    FWIW, SSM is "happier" with a single sheet, single layout, single drawing approach.[/QUOTE
    yes , i agree with you in this point! But!
    i'm sorry for a silly question - when i've got some sheet in SS with fields for example A2 and i'd like to add another sheet for example A3(using layout command "from template") to this file, i've got such a problem - new inserted layout has fields invalid! does it mean i gotta use SSplaceholders instead of using usual SS field category?

  9. #19
    Active Member
    Join Date
    2008-08
    Posts
    54
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    i use such way of work

    i've got some sheet set with some amount of subsets(plans, sections etc). when i want to make a new drawing i click on subset and choose "new sheet" option. then i choose a preferable layout from prompt template menu and i've got 1 layout per file! but if i want to add a new layout from the same template - **** happens! fields are broken! when i simply copy first layout everything is ok!

    maybe in case i use CurrentSheetSetNumber this problem will occur always. should i use another type of SS field like anything else?SSplaceholder?But i used to fill most of the project info via SSproperties and there is no such parameters as Category IssuePurpose etc

    Looking forward to the answer
    Last edited by vapross; 2009-01-06 at 04:32 PM.

  10. #20
    Active Member
    Join Date
    2008-08
    Posts
    54
    Login to Give a bone
    0

    Default Re: Sheet set template file - er-associating multiple layouts

    I've just forgot to import layout to my sheet set. That's the solution.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. 2014: Sheet Set Manager (Re-Associating Sheet To File). Any LISP?
    By omorah in forum AutoCAD Customization
    Replies: 3
    Last Post: 2014-04-18, 07:18 PM
  2. Plotting multiple layouts on one sheet
    By smcgypsea in forum AutoCAD Map 3D - General
    Replies: 0
    Last Post: 2008-06-24, 09:25 PM
  3. Using Template with Multiple Tab Layouts
    By Marv Muston in forum Project Navigator
    Replies: 2
    Last Post: 2006-06-01, 03:13 PM
  4. Multiple Layouts using the Sheet Set Manager
    By glen353712 in forum AutoCAD Sheet Set Manager
    Replies: 3
    Last Post: 2004-10-27, 06:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •