TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CAB on June 14, 2008, 10:37:41 PM

Title: MatchProp LISP
Post by: CAB on June 14, 2008, 10:37:41 PM
I started this routine a year or so ago & was distracted, so I never finished it.
Question is with the built in ACAD command would there be any need or use for my version?
The only advantage mine might have is a greater list of properties to match.
Title: Re: MatchProp LISP
Post by: qjchen on June 15, 2008, 06:32:53 AM
I think it is a very useful rountine to match only part of the property. Just like, sometimes I only need to match the color or width of Text, but not the rotation, then the default Match of Autocad is hard to use.
dear CAB, could you share your code or give a vlx file? Thank you very much.
Title: Re: MatchProp LISP
Post by: Dinosaur on June 15, 2008, 11:06:14 AM
The one thing with the built in function that I had severe issues with when used for mtext was that it forced changing rotation.  Many of my mtext entities HAD to remain at a precise angle and that all or none feature prevented or limited its use for my needs.  Looking at you dialog box, this would not be an issue with your routine.
Title: Re: MatchProp LISP
Post by: Slim© on June 15, 2008, 12:21:10 PM
What they said...
Title: Re: MatchProp LISP
Post by: CAB on June 15, 2008, 12:46:02 PM
I'll try to get version one working next week. It's still too buggy to release. 8-)
Title: Re: MatchProp LISP
Post by: alanjt on June 16, 2008, 07:42:03 AM
1.  an option to match the layer of one object with another.
2.  an option to add the layer of a selected object to the layer state of another object's layer

i know you have the text matching options, but i've noticed that it would be especially nice to be able to match the internal changes of mtext with another (we will change the color of our general notes in the ares that will be altered for the drawings specifics. right now, we just open the mtext, select all, and change color back to by layer.

looks really nice alan, i would def. use it.
Title: Re: MatchProp LISP
Post by: jonesy on June 16, 2008, 07:50:59 AM
This looks really useful Alan.

Its one of the things I liked about Microstation, the ability to choose what to match, but this looks like it goes further than that... so it could be a great asset
Title: Re: MatchProp LISP
Post by: Alan Cullen on June 16, 2008, 07:55:29 AM
Dunno if this is of any use at all......

I have a lisp that works for me. Feel free to attack it and do what ever with it. Hope it helps.........

Code: [Select]
(defun c:cprop ()
 (setq ocmd (getvar "CMDECHO"))
 (setvar "CMDECHO" 0)
 (princ "\n CHANGE OBJECTS TO PROPERTIES OF A SELECTED OBJECT - Mar 2007 - Alan CULLEN")
 (setq sset (ssget (prompt "\n               Select entities to change to new properties.......")))
 (setq ss   (ssget (prompt "\n               Select entity with required properties..............")))
 (if (/= ss nil)
  (progn
   (setq name (ssname ss 0))
   (setq data (entget name))
   (setq newlay (cdr (assoc 8 data)))
   (setq newcol (cdr (assoc 62 data)))
   (setq newltype (cdr (assoc 6 data)))
 ))
 (command "chprop" sset "" "C" newcol "LT" newltype "LA" newlay "")
 (princ "\n              Selected objects changed to new properties.......")
 (setvar "CMDECHO" ocmd)
 (princ)
)
Title: Re: MatchProp LISP
Post by: T.Willey on June 16, 2008, 12:14:31 PM
Maybe this thread will be of some help. (http://www.theswamp.org/index.php?topic=8163.0)  It is the one for my edit properties routine.
Title: Re: MatchProp LISP
Post by: FengK on June 17, 2008, 12:54:16 PM
This post might be useful as well. (http://www.theswamp.org/index.php?topic=19857.msg266746#msg266746)
Title: Re: MatchProp LISP
Post by: CAB on June 17, 2008, 02:10:35 PM
Hey, thanks for all the help.
I'll post some code when I get it working.
Title: Re: MatchProp LISP
Post by: andy_lee on June 05, 2015, 10:48:56 PM
Looks  Nice ! Alan . Do you finish it yet?
Title: Re: MatchProp LISP
Post by: lamarn on June 06, 2015, 10:48:49 AM
Great to see !,please include transparency ..
Title: Re: MatchProp LISP
Post by: roy_043 on June 06, 2015, 11:07:32 AM
Great to see !,please include transparency ..
Note: In AutoCAD the default MatchProp command already includes a transparency option.
Title: Re: MatchProp LISP
Post by: lamarn on June 06, 2015, 12:35:16 PM
I know. But ti replace one command for the other it is nice to include it..
Title: Re: MatchProp LISP
Post by: tombu on June 08, 2015, 08:03:05 AM
Lee Mac has a great MatchTextProps.lsp routine: http://www.lee-mac.com/matchtextprops.html
It simply lacks a Dialog Box interface.  You have to comment out the properties you don't want matched at the top of the routine.
Code: [Select]
  (setq Props
   '(
     Alignment
     AttachmentPoint
     BackgroundFill
     Backward
     DrawingDirection
     Height
     Layer
     LineSpacingDistance
     LineSpacingFactor
     LineSpacingStyle
     Linetype
     LinetypeScale
     Lineweight
     ObliqueAngle
     Rotation
     ScaleFactor
     StyleName
    ; TextString
     Thickness
     UpsideDown
     Width
    )
  )
I'm sure he wouldn't mind someone offering to add a Dialog Box interface for him.