Looking for a Programmatic Way to Associate a Standards File with a Drawing

Looking for a Programmatic Way to Associate a Standards File with a Drawing

Anonymous
Not applicable
525 Views
3 Replies
Message 1 of 4

Looking for a Programmatic Way to Associate a Standards File with a Drawing

Anonymous
Not applicable
We are trying to have a button on a ribbon panel in AutoCAD 2010 associate a .dws file with the current drawing. The "_standards" command brings up the required dialog to let you set the standards file, but I have found no way to include the filename in the command and have it work in the background. I also know that we can associate the standards file with our default template and capture all new drawings, but we need a simple one click of a big button method to hold down on the helpdesk calls.

Let me know if you have something. I am a returnee to AutoCAD after 18 years away so some things may have changed. For background, I am a programmer working in a drawing program and not the other way around.

Edited by: KLGalloway on Feb 24, 2010 9:33 PM Edited by: KLGalloway on Feb 24, 2010 9:34 PM
0 Likes
526 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
So you're not the drawing program working on the programmer? 😛

The names of the attached .DWS files are stored in xrecords
(1 per file) in a dictionary named AcStStandard, which itself is
a member of the root dictionary.

You can look at those items in a drawing with .DWS files
attached to see the exact format.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6343518@discussion.autodesk.com...
We are trying to have a button on a ribbon panel in AutoCAD 2010 associate a
.dws file with the current drawing. The "_standards" command brings up the
required dialog to let you set the standards file, but I have found no way to
include the filename in the command and have it work in the background. I also
know that we can associate the standards file with our default template and
capture all new drawings, but we need a simple one click of a big button method
to hold down on the helpdesk calls.

Let me know if yopu have something. I am a returnee to AutoCAD after 18 years
away so some thing have changed. I am a programmer working in a drawing program
and not the other way around.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thnaks, Tony, but I can't find any reference for an AcStStandard object of any kind. Searching for standard gets lots of returns in the Object Browser, none starting with AcSt which itself only brings back AcStatusBarItem, AcString, and AcStraightLeader.

Do you have a few more clues, or better yet, some simple code to share? Being a dictionary makes sense, but I need a bit of a windup and a push to get going. If you could be so kind.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Please read my post again.

It doesn't say anything about an object named 'AcStStandard', it says
that there is a DBDictionary named 'AcStStandard' in the root dictionary
of the drawing.

If you've been out of the game as long as you say, then you're going to
need to spend some time brushing up on what has changed (which in a
nutshell, is just about everything)

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6343676@discussion.autodesk.com...
Thnaks, Tony, but I can't find any reference for an AcStStandard object of any
kind. Searching for standard gets lots of returns in the Object Browser, none
starting with AcSt which itself only brings back AcStatusBarItem, AcString, and
AcStraightLeader.

Do you have a few more clues, or better yet, some simple code to share? Being a
dictionary makes sense, but I need a bit of a windup and a push to get going. If
you could be so kind.
0 Likes