I just upgraded from Autocad 2013 to Autocad 2015. In 2013 I have created some custom buttons that would change the property of and object. With this upgrade it no longer works. What is support to happen after clicking the button I select object(s) then enter (or right click) that the objects are now is a a grey color that is with a thin hidden linetype. What actually happen is it selects the object.
The original code is
^C^C_select;\_change;p;c;8;lt;hidden2;lw;.05;;
I have modified this macro many times and not get it to work correctly I get it to select the objects, but will not initilize the properties or i modify it and it says invalid selection. I am missing something small, but can not figured it out.
If anyone could please help me.
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@Brianr88888 wrote:
... i modify it and it says invalid selection.
Does the 'Hidden' linetype exist within your drawing prior to your attempt to modify?
"How we think determines what we do, and what we do determines what we get."
The linetype is existing. Yea, I kept getting invalid selection too. I would modify the macro more and sometime it would allow me to select the object(s), but would stop at CHANGE [Properties].
Thinking out loud - Why use the SELECT Command, instead of just using the CHANGE Commands 'select objects' prompt?
Another way of going about this, would be to demand-load a LISP routine, which would offer error handling... Quick example:
(vl-load-com)
(defun c:FOO (/ *error* acDoc) (defun *error* (msg) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "\n** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (ssget "_:L") (progn (vla-startundomark (setq acDoc (vla-get-activedocument (vlax-get-acad-object))) ) (vlax-for x (vla-get-activeselectionset acDoc) (vla-put-color x 8) (vla-put-linetype x "hidden") (vla-put-lineweight x aclnwt005) ) ) ) (*error* nil) )
** Code above assumes that the "Hidden" linetype exists within the active document.
Separately, if you're not sure how to go about demand-loading a LISP, let us know, and we'll help you work that out as well.
Cheers
"How we think determines what we do, and what we do determines what we get."
@Brianr88888 wrote:
I just upgraded from Autocad 2013 to Autocad 2015. In 2013 I have created some custom buttons that would change the property of and object. With this upgrade it no longer works. What is support to happen after clicking the button I select object(s) then enter (or right click) that the objects are now is a a grey color that is with a thin hidden linetype. What actually happen is it selects the object.
The original code is
^C^C_select;\_change;p;c;8;lt;hidden2;lw;.05;;
I have modified this macro many times and not get it to work correctly I get it to select the objects, but will not initilize the properties or i modify it and it says invalid selection. I am missing something small, but can not figured it out.
If anyone could please help me.
Something like this perhaps
^C^C_.select;\_.change;p;;p;c;8;lt;hidden2;lw;.05;;
EDIT: Tooo slooowww
HTH
Henrique
Command: CHPROP Select objects: Specify opposite corner: 2 found Select objects: Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]: c New color [Truecolor/COlorbook] <BYLAYER>: 1 Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]:
Did I miss something?
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
@scot-65 wrote:
Command: CHPROP Select objects: Specify opposite corner: 2 found Select objects: Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]: c New color [Truecolor/COlorbook] <BYLAYER>: 1 Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]:
Did I miss something?
Yes.
The OP command was "Change", not "Chprop" command.
Or the "change" command has been discontinued in 2015?
(2015 not yet installed in this pc)
If so, it was I who miss something...
Henrique
Henrique,
I am using this command. I just want to understand the function of ._ is in the marco (ie: ._select ) thanks