LISP to import corporate profile and set current...

LISP to import corporate profile and set current...

Anonymous
Not applicable
3,140 Views
7 Replies
Message 1 of 8

LISP to import corporate profile and set current...

Anonymous
Not applicable

I have been searching for this and cannot seem to find any working solutions.  I have tried may routines which I found on this forum and others outside and none seem to work for AutoCAD 2018.

 

We have a corporate profile which resides on the network.  I use the startup to set this one, however if I update it, I need a way to force load the latest version using my lisp routines which run when AutoCAD starts up.

 

I attached a few of the ones which I have tried which didn't work or gave errors.

 

Any assistance would be greatly appreciated.

0 Likes
3,141 Views
7 Replies
Replies (7)
Message 2 of 8

john.uhden
Mentor
Mentor

I haven't looked at your attachments, but I have attached a file with code that may guide you toward your solution.

John F. Uhden

0 Likes
Message 3 of 8

Anonymous
Not applicable

John-

 

Thanks for this routine.  It looks good, but I cannot determine where to place my file name or the file path.  I loaded it, but don't see the actual command name to execute it.

 

Thanks,

Dave

0 Likes
Message 4 of 8

john.uhden
Mentor
Mentor
If you look at the defuns,

*set_acad_profile* takes any profile name as an argument and sets it
current if it is found in the list of profiles.

*set_user_profile* takes one argument being the path to find a .ARG file. I
gets the current USERNAME from the environment (whoever is logged in). So
say the USERNAME is "Dave." It will look in the path for DAVE.arg and load
and make it current.

Maybe that's not what you need. I was just trying to demonstrate the vla
functions you can use to manipulate profiles by name. Feel free to modify
them as you need to accomplish your task.

John F. Uhden

0 Likes
Message 5 of 8

EddieSaez
Advocate
Advocate

Not sure if you have resolved this.. IF NOT have a look at this
https://jtbworld.com/autocad-profiles-lsp

 

 

0 Likes
Message 6 of 8

Sea-Haven
Mentor
Mentor

If you use the desktop icon to start you can make a copy of it and force which profile to use, its the /p switch

 

Just copy icon paste, right click, click on properties, and change the /p profile name, /p "<<C3D_Metric>>" etc You will though have to already have imported the arg file so it can load the correct profile only need to do once ! Or just load the arg and edit the original icon to correct profile.

 

We had 2 icons on laptops remote and office so would use server in office, local drive when remote. 

 

Message 7 of 8

john.uhden
Mentor
Mentor

Alan:

That is very simple but clever,

OR

he could use the set_user_profile function I had provided back when.  I kinda remember it took me a lot of trial and error to figure it out years ago, though I don't remember why I did it.  Maybe it will come back to me when I remember my birth date.  :]

John F. Uhden

0 Likes
Message 8 of 8

alexi_c
Explorer
Explorer

Hello John, i'm not a lisp pro, so I can't figure out how to adapte your script to my needs.

 

I want to import my custom profile named autocad2023.arg that is located in this folder I:\dessin\cad2023\autocad2023.arg and set it current

 

could you help me adapte it please.

 

thanks

alexi

 

0 Likes