interfacing with AutoCAD

Discussion in 'Programming & Software Development' started by G-Man, Aug 8, 2017.

  1. G-Man

    G-Man Member

    Joined:
    Nov 27, 2007
    Messages:
    22
    Hi Guys,

    I was wondering if anyone here has been able to interface their software with AutoCAD using it's api?

    Specifically I want to create a revisioning program that locks a released revision down to read only and creates new files for internal revisions.

    As far as the files go I have managed to do this fairly easily with C# & WPF. my question now is how do I extract the attributes to a db, and then be able to update & sync directly from the db (probably a csv file). I know how to create these from within AutoCAD but I was hoping to just build a button to "Extract attributes" and/or "sync attributes" within the revisioning program itself.
    I initially wanted to do this from PC's even without AutoCAD installed s the people who will be defining the attributes aren't the ones drawing the docs, but a RealDWG licence is like $5k + subscription which is a bit rich for the functionality I am after. So I am happy to just be able to do it with a pc that has AutoCAD installed.

    Another problem is we use AutoCAD LT, and I believe I read that ObjectARX only works with the full version (We may have one licence in the company, might be able to set up a server to handle these "requests"). I am hoping someone knows how to extract/write attributes and can point out to me what I need to do? I have had little luck in my research. Hoping to maybe use the .NET libraries or something? I am struggling to find useful info about using the api, also I don't have access to a machine with AutoCAD installed to actually look through the software/test stuff for a while yet (away on site work)

    This is proving more difficult to work out than it should need to be. All help is much appreciated :)

    Cheers.
     
  2. Sindarin Ultra

    Sindarin Ultra Member

    Joined:
    Sep 7, 2005
    Messages:
    243
    Location:
    Brisbane
    It sounds like you're trying to roll your own doc management system, not a simple task especially factoring in reliability and backups etc. Have you looked at options like ProjectWise or 12d Synergy? I wouldn't be surprised to find out they are very expensive though, I've only ever been a user
     
  3. neRok

    neRok Member

    Joined:
    Aug 19, 2006
    Messages:
    2,261
    Location:
    Perth NOR
    I've done a little programming with acad, but can't remember any specifics :lol:

    The company I recently worked for had a doc management system that required you to check in/out things to work on, and the drafting department avoided that system and did their own thing, only uploading finished revisions (which had to be all merged and flattened of xrefs etc). So my takeaway is, if it's too hard or inconvenient, it won't be used.

    But regarding you actual idea, perhaps you can override or make your own save routine for acad that reads the attributes you refer to and saves them into the file's details (the ones you see when you right click the file in explorer, go properties, then details tab). This way, you could make an external application that reads those details, which I presume are easily accessed.
    Additionally, if the attributes you refer to are saved in the title block, it is possible to read/extract and even write those details - I just don't remember exactly how. I did make a little macro to copy those attributes from 1 title block to another though (for when updating or otherwise replacing it), so that's why I know it is possible.
     
  4. G-Man

    G-Man Member

    Joined:
    Nov 27, 2007
    Messages:
    22
    We have a "doc management system" that is just excel lists and such but no-one really follows it and info gets lost and sometimes files get overwritten, so I am trying to lock down the files so this does not happen. The important revisioning details are in the title block; but i'm hoping to modify the att's of each block in an easy fashion.

    I already know how to do it all from within AutoCAD, but since it is a 'process' people are unlikely to follow it or forget leaving us with the same issues I am trying to solve. It is starting to bother me how difficult such a simple task is proving to be; especially when it is easy enough to do within the software, and that software needs to be installed anyway to make the api's work in their intended fashion.

    Perhaps I can make a macro within AutoCAD that automagically syncs with the database/output file upon opening and just use the software to "open the file & run the macro) - Not sure how simple that would be either though. I assume much easier than what I am trying to do. (If only I had ACAD installed to play with it...)
     
  5. chook

    chook Member

    Joined:
    Apr 9, 2002
    Messages:
    512
    Disclaimer: I word for a company that produces EDRM and ECM systems that interface with AutoCAD.

    There are numerous options on the market that will manage your drawings. The biggest catch you often find is making sure they are aware of the multiple parts of an AutoCAD drawing. Most people that use AutoCAD will want the title block captured as metadata (actual metadata, not the Federal Government's version of metadata). A super simple and free (in terms of licensing costs) solution might be SharePoint Foundation. It isn't going to capture the metadata int he title block though. Users will have to manually enter it into a list or similar.

    neRok is completely correct about the users. The last place I worked had a separate drawing management system to their EDRMS because the EDRMS was "too hard". It wasn't actually too hard but it didn't meet the business needs. Engineering and drafting people are there for their professional skills, not for their document management skills.

    12D is very expensive but very good however it isn't the solution to your problem.
     
  6. underskore

    underskore Member

    Joined:
    Nov 5, 2002
    Messages:
    4,131
    Location:
    3147
    Isn't one of the biggest limitations with LT the lack of (more than cosmetic) customisation?
    can you even make a 'macro' with LT?
    Until I just checked I wouldn't have been surprised if LT couldn't even make dynamic blocks
    Oh, and then there is Vault that comes with the suites and the more expensive ACAD flavours...

    for AutoCAD work we only worry about accurately tracking 'released' pdfs.
    for Inventor work we keep step exports of every 'complete' or 'released' design and for the intermediate stages we've got them set to keep stacks of 'old versions'
    it's far from ideal but for the work we do it's far from the worst we could be doing.
     
    Last edited: Aug 16, 2017

Share This Page