Results 1 to 8 of 8

Thread: Sheetset Interface w/ VBA?

  1. #1
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    127

    Question Sheetset Interface w/ VBA?

    Hi all,

    I'm working on a project that I could use some help on. Here's what I want to do:

    Enter a district office number into a custom property within a sheet set. Have that flag an event that takes that number, compares it to an external xls file containing a list of offices and their addresses. Take the corresponding record from the xls file and populate the district address info into the appropriate custom properties of the sheet set.

    I'm quite familiar with VBA for AutoCAD but I haven't found any good info on the Sheetset API. Any help, information, and/or suggestions would be appreciated.

    Thanks!
    MC

    BTW, I can interface with an open xls file in Excel fairly well but it would be ideal if anybody could suggest a way to interface with the xls file without having to open it. Thanks!

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,519

    Default Re: Sheetset Interface w/ VBA?

    I don't have any links right now, but google "R. Robert Bell", JTB World (by Jimmy Bergmark), and Lee Ambrosius. These three guys have information available on SSM API.

    Also, check out the SSM VBA examples that come with AutoCAD.


    Lastly, look for AU class handouts on the topic. Robert and Lee have at least one each.

  3. #3
    Forum Manager, Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    4,776

    Default Re: Sheetset Interface w/ VBA?

    Additionally, you can search this forum. There is information on both subjects.
    C:> ED WORKING....

  4. #4
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    127

    Default Re: Sheetset Interface w/ VBA?

    Thanks to both of you! With the data you pointed me to, I have accomplished nearly all that I aspired to. Now I am left with two irksome issues that I could use some help on. First of all, I can create a sheet set, but when I'm done, it doesn't show up in the Sheet Set Manager (UI) for the user to interface with. It's like all of the work is being done in the background or something? After the routine runs, the user must then browse out to the .dst file location and open the project manually. Any way around that?

    Secondly, I can only seem to interface with an open sheetset once. After I extract the custom properties, review them, and update them, that sheetset is no longer visible in code. If I go into the manager and open a sheet, it's like the interface gets refreshed and the sheetset is available in the code again. Any ideas on this?

    I can post the code but it's pretty long. Let me know.

    Thanks!
    MC

  5. #5
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Sheetset Interface w/ VBA?

    You definitely have some releasing and/or locking issues. It is critical that you release your objects as soon as they are no longer needed. It is also important that you lock and unlock the database at the appropriate times. There is a Reload method to force an update.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  6. #6
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    127

    Default Re: Sheetset Interface w/ VBA?

    Robert,

    Thanks for the info. I've been working very hard to make sure that I address the locking and unlocking issues within the sheetset. I just tried posting my code for review but it is too long. I'll see if I can use the reload method that you mentioned and see if that works.

    MC

  7. #7
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    127

    Default Re: Sheetset Interface w/ VBA?

    I was unable to find a reload method. Could you post or refer me to an example?

    Thanks!
    Michael

  8. #8
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    127

    Default Re: Sheetset Interface w/ VBA?

    Quote Originally Posted by mcoffman View Post

    ...Secondly, I can only seem to interface with an open sheetset once. After I extract the custom properties, review them, and update them, that sheetset is no longer visible in code. If I go into the manager and open a sheet, it's like the interface gets refreshed and the sheetset is available in the code again. Any ideas on this?...
    Somehow I have been able to resolve this issue. I rearranged some of my code and broke some of it out into additional sub procedures. Now it seems to be running beautifully! Not sure what's different but I'm happy! Now if I could only figure out how to get a new sheetset to display in the Sheet Set Mangager (UI) I'd be exstatic!

    MC

Similar Threads

  1. Sheetset Manager
    By ndbrainard in forum DWG TrueView - Wish List
    Replies: 2
    Last Post: 2010-06-17, 10:50 AM
  2. Sheetset Issue
    By gmatheson.88942 in forum AutoCAD General
    Replies: 1
    Last Post: 2009-11-30, 11:04 AM
  3. sheetset component for vb.net
    By adam.kalajzich in forum Dot Net API
    Replies: 0
    Last Post: 2009-09-13, 11:37 PM
  4. SheetSet access using VB.NET?
    By PMPFern in forum Dot Net API
    Replies: 0
    Last Post: 2008-11-17, 03:15 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
  •