This tested out fine for one slide
;;; build a list of slides
;;; match the slide in the list to the appropriate TitleLine4 tag
;;; insert the slide after TitleLine4 has been identified.
;;;
)
(if (not (member msg '
("Function cancelled" "quit / exit abort"))) )
)
(defun lm:getattributevalue
(blk tag
/ val enx
) )
)
)
(setq sld1
"Slide-SingleLine.sld")
(setq ss
(ssget "x" '
((0 .
"INSERT") (2 .
"TBLK_ATT_CTL") (66 .
1)))) (setq attvalue
(LM:GetAttributeValue
(ssname ss
0) "TITLELINE4")) );;end cond
)
)
My start of an attempt to add more Tag values to attvalue & create a list of the matching slides. Have no idea how to make the connection between the attvalue and the required slide variable. Or the proper syntax for the list of slides as a single variable.
(defun C:STA_Slide_Ins
( / )
)
(if (not (member msg '
("Function cancelled" "quit / exit abort"))) )
)
(defun lm:getattributevalue
(blk tag
/ val enx
) )
)
)
;;;need to make the attvalue in TitleLine4 match the slide name in this list
;;;and build the list of slide files.
'(
(sld1 "Slide-Single Line.sld")
(sld2 "Slide-AC Schematic.sld")
(sld3 "Slide-Control Schematic.sld")
(sld4 "Slide-Network Diagram.sld")
(sld5 "Slide-Panel Layout.sld")
)
(setq ss
(ssget "x" '
((0 .
"INSERT") (2 .
"TBLK_ATT_CTL") (66 .
1)))) (setq attvalue
(LM:GetAttributeValue
(ssname ss
0) "TITLELINE4")) (cond ((wcmatch (strcase attvalue
) "SINGLE LINE,AC SCHEMATIC,CONTROL SCHEMATIC,NETWORK DIAGRAM,PANEL LAYOUT")
(command "_VSlide" aslide
);;where "aslide" is the name of a slide in a directory to be inserted.
);;end cond
)
The base for this code comes from routine Lee Mac helped me with a while back that has served me well for a couple other routines. Thought I'd with it as it seems like the proper place to start.