I was messing around with trying to get a feature line property name to the clip board. I have the base code to get the name but, not sure how to add this to the clip board.
;; Copy to Clipboard - Lee Mac
;; Using the same method as MP demonstrates here: http://bit.ly/170kacW
(defun LM:copytoclipboard ( str / clp htm par )
(if (setq htm (vlax-create-object "htmlfile"))
(progn
(vl-catch-all-apply
'(lambda ( )
(setq par (vlax-get htm 'parentwindow)
clp (vlax-get par 'clipboarddata)
)
(vlax-invoke clp 'setdata "Text" str)
)
)
(foreach obj (list clp par htm)
(if (= 'vla-object (type obj))
(vlax-release-object obj)
)
)
str
)
)
)
(vl-load-com) (princ)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:flename (/ ent fle)
(while (setq ent (entsel "\nSelect Feature Line:"))
(setq fle (vlax-ename->vla-object (car ent)))
;; (princ (strcat "Feature Line Name: " (vlax-get fle 'Name)))
(LM:copytoclipboard (strcat "(vlax-get fle 'Name)"))
;; (LM:copytoclipboard (strcat "(princ (strcat "Feature Line Name: " (vlax-get fle 'Name)))"))
)
(princ))
(C:flename)
What i am trying to do is ultimately take the feature line name, and add it into the surface as a break line name. But i thought it would be a good start to select the feature line, then right click add as breakline to surface and just ctrl-v in the name.
thanks for any help with this!