Author Topic: MEP2008 How do I import a style from another project/drawing  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

commodore

  • Newt
  • Posts: 51
MEP2008 How do I import a style from another project/drawing
« on: January 27, 2009, 07:14:49 AM »
I'm using MEP 2008
I'm looking for some code or guideance on how to import styles from another drawing into my current drawing.
I still a VBA beginner so type slowly please :-) 

Matt__W

  • Seagull
  • Posts: 12954
  • I like my water diluted.
Re: MEP2008 How do I import a style from another project/drawing
« Reply #1 on: January 27, 2009, 08:29:35 AM »
Doing it by code is difficult (if not impossible).

Your best bet would be to use the STYLE MANAGER and open a drawing that has the styles you want to copy and do it that way.  Or you can create a DWG that contains all of your default styles and then simply insert that drawing.  The insert method will NOT prompt you to overwrite existing styles.  It will only bring in those that do not exist in the current drawing.  The last method would be to use the CAD STANDARDS and synchronize your project settings.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

commodore

  • Newt
  • Posts: 51
Re: MEP2008 How do I import a style from another project/drawing
« Reply #2 on: February 26, 2009, 11:32:29 AM »
Turns out its not impossible nor difficult
http://discussion.autodesk.com/forums/thread.jspa?messageID=581633&
(make sure you reference the AutoCAD/ObjectDBX Common Type Library)
Thanks Bobby!

jbuzbee

  • Swamp Rat
  • Posts: 833
Re: MEP2008 How do I import a style from another project/drawing
« Reply #3 on: March 12, 2009, 12:37:03 PM »
Commodore,

A couple of issues with importing styles with ObjectDBX:  Property sets, Materials and classifications attached to objects do not import cleanly.  If a classification exists, it is ignored and a new one is created "myDoocClassification(2)". 

I use a different approach which works on everything but classifications.  I open the host document via objectdbx and via activex create a block with the object added in question.  Then I use objectdbx to import the block into the active drawing.  I don't know why this works: perhaps it's because the AEC object was already created.  Dunno.

I stopped using classifications for this reason.  I haven't checked if this has changed in 2009 - if I get some time I might.

Just thought I'd give you a heads up.
James Buzbee
Windows 8