MATCHPROP - Don't display settings used on commandline

MATCHPROP - Don't display settings used on commandline

3dwannab
Advocate Advocate
741 Views
8 Replies
Message 1 of 9

MATCHPROP - Don't display settings used on commandline

3dwannab
Advocate
Advocate

 

See the code below. It's outputting

 

 

 

Current active settings:  Color Layer Ltype Ltscale Lineweight Transparency Thickness Dim Text Hatch Polyline Viewport Table Material Multileader Center object 

 

 

 
I've tried all the variables that I can think of to remove it. Expert variable from 1 through 5 but no joy.
 
I've checked the registry for anything in there but can't see anything.
 

 

 

(setq var_nomutt (getvar "nomutt"))
(setq var_expert (getvar "expert"))
(setq var_cmdecho (getvar "cmdecho"))

(setvar 'cmdecho 0)
(setvar 'nomutt 1)
(setvar 'expert 5)

(entmake '((0 . "CIRCLE") (62 . 1) (10 0.0 0.0 0.0) (40 . 0.00001)))
(setq tempObj (entlast))

; Doesn't work, outputs Current active settings:  Color Layer Ltype Ltscale Lineweight Transparency Thickness Dim Text Hatch Polyline Viewport Table Material Multileader Center object
(vl-cmdf "_.matchprop" "_non" (entlast) "_S" "")

; This doesn't work either
; (vla-sendcommand
;   (cond
;     (*AcadDoc*)
;     ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))
;   )
;   (strcat "_.matchprop (entlast) _S  ")
; )

(entdel tempObj)

(setvar 'nomutt var_nomutt)
(setvar 'expert var_expert)
(setvar 'cmdecho var_cmdecho)

 

 

0 Likes
742 Views
8 Replies
Replies (8)
Message 2 of 9

paullimapa
Mentor
Mentor

I assume you're referring to a way to prevent this Property Settings window from appearing but a command line option to change these settings:

paullimapa_0-1688341471647.png

The answer is no as discussed briefly here:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/system-variable-for-matchprop-settin...

As well as reply #12 here:

https://www.theswamp.org/index.php?topic=37406.0

Now reply #13 points to a lisp code ZZZ basically replicating MatchProp.  But you'll just have to modify it to give the user command line options to select which settings to match based on the object selected:

https://www.cadtutor.net/forum/topic/77773-make-current-line-properties-routine-lsp/#comment-620080


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 9

3dwannab
Advocate
Advocate

Sorry, think you misunderstand.

 

I want to suppress the message 'Current active settings: Color Layer Ltype Ltscale Lineweight ...' after picking the first entity.

 

You can change those settings with a variable. MATCHMODE. That was my post #13.

 

Not sure why I replied to myself  there!! 🤣

0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

@3dwannab wrote:
...
; Doesn't work, outputs Current active settings:  Color Layer Ltype Ltscale Lineweight Transparency Thickness Dim Text Hatch Polyline Viewport Table Material Multileader Center object
(vl-cmdf "_.matchprop" "_non" (entlast) "_S" "")
....

You are giving the MATCHPROP command inappropriate inputs.  Do it manually, starting with (command "_.matchprop") because some commands work a little differently when called that way, and note the exact sequence of prompts and necessary responses.

 

Things that jump out for me:  An Osnap mode would not be appropriate preceding an entity name, but only a location.  And if you are trying to apply the properties of something to the last-drawn entity, it needs a source object to pull properties from, before being given the thing you want those properties applied to.  Do you mean CHPROP instead?  Study the two Commands in Help.

 

Try your code without changing the NOMUTT and CMDECHO System Variables, so you can see what's going on.  After running it and getting your error, look back at the command-line history for messages -- you should get clues as to what to fix.  Maybe it's erroring out in MATCHPROP, and then taking the _S for a Settings thing, somehow.  Only after you have it working should you add in the changing of NOMUTT/CMDECHO.

Kent Cooper, AIA
0 Likes
Message 5 of 9

Kent1Cooper
Consultant
Consultant

@3dwannab wrote:

....

Not sure why I replied to myself  there!! 🤣


[That's what happens when you use the "Reply to the topic" slot below the last Message -- it always shows as being in Reply to the author of Message 1.  Instead, use the REPLY button toward the lower right in the Message you're Replying to.]

Kent Cooper, AIA
0 Likes
Message 6 of 9

paullimapa
Mentor
Mentor

Well, there may be no settings available for the MatchProp after execution message to be suppressed:

Current active settings: Color Layer Ltype Ltscale Lineweight ...

So my previous response with the custom ZZZ code still applies.

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 9

3dwannab
Advocate
Advocate

@Kent1Cooper, tried that. Once you press enter on (command "_.matchprop") and click the entity to get props from that stuff prints to the cmd line.

 

Thanks all, I guess it's a cause of "rolling your own".

0 Likes
Message 8 of 9

Kent1Cooper
Consultant
Consultant

@3dwannab wrote:

.... Once you press enter on (command "_.matchprop") and click the entity to get props from that stuff prints to the cmd line. ....


So it's true that you can't suppress that stuff with NOMUTT or CMDECHO settings, but that doesn't mean the command isn't working.  It still prompts for a source object to draw properties from, whether or not you are allowed to "see" that prompt by CMDECHO/NOMUTT settings.  Your "_non" Osnap call in Message 1 is pointless, but apparently doesn't interfere.  But it pulls properties from the object you just drew [lines 13 & 21 in Message 1] -- is that really what you want to do?  Or is the intent to give to that newly-drawn object properties drawn from some other object?  Also, the Settings option that you go into brings up a dialog box that also can't be suppressed, but when that's OK'd, your "" Enter simply ends the command -- nothing is picked to assign the properties to -- so of course it doesn't do anything.  [And at line 21, the Enter is missing one ".]

Kent Cooper, AIA
Message 9 of 9

komondormrex
Mentor
Mentor

so the solution may be in writing custom command to match properties with variable 'matchmode' used.