TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: myloveflyer on November 13, 2019, 04:03:26 AM
-
The left side is the original graphic, the right side is the completed one, the straight line is connected between the center of the circle, and the layer is set according to the similar text, who can help to see how this program is written!
-
Not the fastest, but give this a try:
(defun c:foo
(/ a d el l mp p s tmp tx
) ;; RJP » 2019-11-13
)
)
)
)
)
)
)
)
)
)
)
)
)
-
Not the fastest, but give this a try:
(defun c:foo
(/ a d el l mp p s tmp tx
) ;; RJP » 2019-11-13
)
)
)
)
)
)
)
)
)
)
)
)
)
HI,ronjonp,Thanks You!
Now there is still a question, can you change the name of the corresponding layer of the text according to the right data table, see the attached picture.
-
Are you sure your 4-2 is correct? In the rest of your table all the *-2 are 2M20.
Easy to do with consistent logic:
Looking closer I don't see a pattern .. research creating an association list then apply the name to the key found (cdr (assoc key lst)).
-
Are you sure your 4-2 is correct? In the rest of your table all the *-2 are 2M20.
Easy to do with consistent logic:
Looking closer I don't see a pattern .. research creating an association list then apply the name to the key found (cdr (assoc key lst)).
Hi,ronjonp!
I am sure that "4-2" is correct. I may not explain it clearly. "4-2" corresponds to "2M24" in the table, then the layer name of the line corresponding to "4-2" is "4M24" or " 4-M24", for example, "3-1" corresponds to "2M24" in the table, then the layer name of the line corresponding to "3-1" is "3M24" or "3-M24", all the straight lines connected by the center The layers are all based on the combination of the alphanumeric characters corresponding to the same line in the table. For example, "2-12" corresponds to "2M20" in the table, then the layer name of the line corresponding to 2-12 is "" 2M20" ("2" in this line layer name "2M20" is the first item in "2-12", and "M20" is "2-12" in the corresponding "2M20" in the table. ") Or directly give the layer name "2-M20", which is easier to understand, see the connection method of the layer name shown in the figure.
-
As stated above look into creating an association list of your values. I've already given you a fish, now you have to gut it. :wink:.
-
You haven't caught it yet your just trying to land it. May have to play with it for a while.