HenriDeNys Posted June 13, 2014 Share Posted June 13, 2014 Hi I am trying to create a program to easilly create revisions of autocad (Plant 3D) drawings in our system. I copy drawings to a new revision folder and change the name. The only problem I still have is that when I copy the drawing, it is still linked to the original configeration file (project.cfg). I would like to change the link to another configuration file using the vb code. Is this possible? What is the code line I have to use to do so in vb? Many thanks! Quote Link to comment Share on other sites More sharing options...
welldriller Posted June 16, 2014 Share Posted June 16, 2014 Way out of my leag here -- but -- i think you need to be very careful when you go messing with a config.sys file. Sure that someone that knows more then i do will jump in here and give you better advise and more accurate information. Quote Link to comment Share on other sites More sharing options...
HenriDeNys Posted June 19, 2014 Author Share Posted June 19, 2014 It is not a config.sys file it is a .cfg file. I think it is a file created by Cadworx (an application that runs on Autocad). Somehow the drawing is linked to this file, but I don't know how to change this except manually in Cadworx Plant Quote Link to comment Share on other sites More sharing options...
BlackBox Posted June 20, 2014 Share Posted June 20, 2014 VBA, or VB.NET (you just say "vb code")? It is not a config.sys file it is a .cfg file. I think it is a file created by Cadworx (an application that runs on Autocad). Somehow the drawing is linked to this file, but I don't know how to change this except manually in Cadworx Plant .NET and ObjectARX apps typically associate a given drawing to an external file, database, etc. by recording data (GUID?) within the drawing's database, registry applications, XRecord, etc... Given that CADWorx is a 3rd party app, *IF* this information is exposed to available APIs, then you can probably cull the drawing's Symbol Tables, Dictionaries, etc. via MgdDbg. HTH Quote Link to comment Share on other sites More sharing options...
troggarf Posted October 4, 2014 Share Posted October 4, 2014 CADWorx files don't remember what .cfg file was used when components are placed in the drawing. If a .cfg file is in the folder where the drawings are located, CADWorx will use that .cfg file. If you copy those files into another folder and want another .cfg file to be used, you could just close AutoCAD and then reopen it and let CADWorx see the new .cfg file. Or you could manually switch what .cfg file from within the "SETUP" dialog box > Configuration... Something to keep in mind as a general rule for AutoCAD is that when you close AutoCAD and then reopen it, it will generally open up the last-used-profile unless told otherwise. Without closing AutoCAD/CADWorx and re-opening, you will need to change .cfg files manually. ~Greg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.