MakeCurrent

MakeCurrent

john.uhden
Mentor Mentor
2,314 Views
22 Replies
Message 1 of 23

MakeCurrent

john.uhden
Mentor
Mentor

As far as I can tell (in C3D 2020), the MakeCurrent command deals only with an object's layer, to make it the current layer.

Whereas my MakeCurrent AutoLisp command function (though barely into puberty) aims to set most any drawing variable to a selected object's corresponding property like...

("plinewid"  "constantwidth")

("HPName"  "PatternName")

("HPScale"  "PatternScale")

("HPAng"  "PatternAngle")

("TextStyle"  "StyleName")

("TextHeight"  "Height")

etc.

Can I get volunteers to contribute to a list of matching pairs for everything that can match?

I will then add the list to my code and publish it for free.  And the more we find, I will update periodically.

I don't want them as dotted pairs because I will probably want to (mapcar 'reverse vlist), or it should be (property variable) instead.

John F. Uhden

0 Likes
Accepted solutions (1)
2,315 Views
22 Replies
Replies (22)
Message 21 of 23

cadffm
Consultant
Consultant

Seems as though Sebastian ( @cadffm ) dug up this year old thread.


Oups, wrong thread 🤣

 

Sebastian

0 Likes
Message 22 of 23

roloNCC
Advocate
Advocate

@Kent1Cooper once I download, where should the file reside and will autocad automatically recognize it. I have no idea on how to do any of the set up. Thanks

 

0 Likes
Message 23 of 23

Kent1Cooper
Consultant
Consultant

You can put it anywhere you like, but....  In the OPTIONS dialog box, Files tab, the top item is the Support File Search Path list.  If you put it in some support folder in that list, AutoCAD will know where to look if you just put in [at the Command: line] (load "MakeMore").  Or use the APPLOAD command, navigate to wherever you put it, and select and Load it there.  Once loaded, the MM command will be available.

 

If you want the command to always be available in all drawings, use a file called acaddoc.lsp, located in any of those listed folders.  Whatever is in it will be run upon creating or opening any drawing file.  You can find whether you already have such a file with this at the Command line:

(findfile "acaddoc.lsp")

which will return its filepath location if it exists, or nil if you don't have one.  You can make one new, or open the one you already have, in a plain-text editor such as Notepad [not a word processor].  Add (load "MakeMore") as a line in that file, even if it's the only line in a newly-created file.

If you want, you can instead have it ready to load if called for, instead of outright loaded no matter what.  Use this line instead:

(autoload "MakeMore" '("MM"))

and it will know the command name may be needed, but it won't actually load the file until the first time you call for the command.

Kent Cooper, AIA
0 Likes