Jump to content

Change config file


HenriDeNys

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

VBA, or VB.NET (you just say "vb code")? :unsure:

 

 

 

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

Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...