How to read a dst file?

How to read a dst file?

Anonymous
Not applicable
1,184 Views
4 Replies
Message 1 of 5

How to read a dst file?

Anonymous
Not applicable
Hi
I want to search layout from a dst file,anyone has idea?
0 Likes
1,185 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
C:\Program Files\AutoCAD 2010\Help\acad_sso.chm
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thank you.
I have read the acad_sso.chm,but it look like for VBA, How ARX? Edited by: Y_Z_X on Jul 17, 2009 2:30 AM
0 Likes
Message 4 of 5

cadMeUp
Collaborator
Collaborator
Yeah, you pretty much have to use COM to access the Sheet Set Manager API. Here is something that can get you started, pretty easy. I have this for AutoCAD/ObjectARX 2009:

1. Create a new ARX project with support for MFC.

2. Add this #import line to your StdAfx.h file, close to the bottom after the #include "arxHeaders.h" statement:
#import "acsmcomponents17.tlb" no_implementation raw_interfaces_only named_guids

(There is a 'acsmcomponents17.tlb' file located in your ARX distribution under 'inc-win32' or 'inc-x64', so make sure the #import statement can find it, though, if you have your paths set-up correctly for ARX in VS it should already be able to find it).

3. Add the code in the attached file to one of your command handlers. Build and test the project. If all goes well it should print out the name of the first sheet in the list with some basic info of the associated layout. Then it will print the names of the two subsets 'Architectural' and 'Structural'.

A couple of notes about the attached file, I added the #import statement (commented) to the top of the file for easy copy and paste. Also, ***important***, the sample is set to open the AutoCAD sample DST at:
C:\\Sample\Sheet Sets\Architectural\IRD Addition.dst

Make sure you change this line to the correct path:
CComBSTR dstPath("C:\\Autodesk\\AutoCAD MEP 2009\\Sample\\Sheet Sets\\Architectural\\IRD Addition.dst");

If you want to access sheets within subsets within subsets, you'll have to create some kind of recursive function to handle that scenario.

One other thing to be aware of:
AutoCAD/ObjectARX 2009 use 'acsmcomponents17.tlb'
AutoCAD/ObjectARX 2010 use 'acsmcomponents18.tlb'

I hope it works for you!
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you very much.
0 Likes