pipingdesignonline.com

Topic Options
#76813 - 11/15/22 07:31 AM Changing CADWorx Structure Configuration File
TroyM Offline
Member

Registered: 11/14/22
Posts: 2
Loc: Texas, US
Is there a way to change the CADWorx Structure 2020's (or later) configuration file from a LISP routine? I've made a series of custom client selector buttons and each button runs lisp routines to change settings specific to each client (template paths, tool palette path, etc.). However, I'd like to also be able to change the CADWorx Structure configuration file with each client.

Top
#76817 - 11/16/22 09:52 AM Re: Changing CADWorx Structure Configuration File [Re: TroyM]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
Kind of... It's a simple text file, so if you can parse it out and find the settings you want, then you can change them. But I don't think there is not an easy way to refresh the settings until a restart of CAD.
_________________________
matt worland
ECE Design

Top
#76821 - 11/16/22 10:52 AM Re: Changing CADWorx Structure Configuration File [Re: Matt.Worland]
TroyM Offline
Member

Registered: 11/14/22
Posts: 2
Loc: Texas, US
Is it possible to share the text file or a portion of the text file related to changing the config file?

Top
#76824 - 11/16/22 11:41 AM Re: Changing CADWorx Structure Configuration File [Re: TroyM]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
I don't have any code that changes the config file.
I'd look here at the concepts:
https://www.afralisp.net/autolisp/tutorials/file-handling.php
Then read the entire file into memory.
Search each line for your setting.
Change the setting
close config file
create a new file to overwrite the existing config file

Once you update the config file it can be shared with others to use the same file.

Usually, the settings only need to be set once, so you can just set them, then put the file in a location all users can see.
_________________________
matt worland
ECE Design

Top



Moderator:  AimeeFerguson 
Who's Online
0 registered (), 33 Guests and 2 Spiders online.
Key: Admin, Global Mod, Mod
April
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Forum Stats
12065 Members
14 Forums
16973 Topics
75151 Posts

Max Online: 303 @ 01/28/20 11:58 PM
Top Posters (30 Days)