I'd like to see if anyone has anything to contribute to creating and setting up Sheet Sets on the fly using VLA functions and DBX... Up until now I've only found bits and pieces on this and that.. Just the same I'll be continuing on doing the same, and post anything I come up with... I've got a must better understanding on DBX, and just starting on the Sheet Sets... -- MASi Copyright 2004 by Cadentity www.Cadentity.com Autodesk Authorized Developer
Up until now, I've found this on fields, but can't remember where I got it .... (defun cfield (/) ;LinkTemplate.KeyDescriptions.Item (setq pDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (setq pDBObj (vla-GetInterfaceObject (vlax-get-acad-object) "CAO.DbConnect.16"))) (if (null pDBObj) (progn (alert "Cannot create CAO Automation server.") (exit))) (setq pLTs(vlax-invoke-method pDBObj "GetLinkTemplates" pDoc)) (setq pKeyDescs (vla-GetInterfaceObject (vlax-get-acad-object) "CAO.KeyDescriptions")) (princ) ) (defun c:CreateLT() (vl-load-com) ;get the DBConnect (setq pDBObj (vla-GetInterfaceObject (vlax-get-acad-object) "CAO.dbConnect")) (setq pKeyDescs (vla-GetInterfaceObject (vlax-get-acad-object) "CAO.KeyDescriptions")) (if (null pDBObj) (progn (alert "Cannot create CAO Automation server.") (exit))) ;get the linktemplates (setq pLTs(vlax-invoke-method pDBObj "GetLinkTemplates" pDoc)) ;prepare the keydescriptions (setq pKeyDescs (vla-GetInterfaceObject (vlax-get-acad-object) "CAO.KeyDescriptions")) (vlax-invoke-method pKeyDescs "ADD" "TAG_NUMBER" 3 nil nil) (vlax-invoke-method pKeyDescs "ADD" "Manufacturer" 1 nil nil) ;create two link templates (vlax-invoke-method pLTs "ADD" "jet_dbsamples" nil nil "COMPUTER" "LTCreatedByVLispCAO" pKeyDescs) (vlax-invoke-method pLTs "ADD" "jet_dbsamples" nil nil "COMPUTER" "LTtobeDeleted" pKeyDescs) ;sample code to show how to delete the link template (vlax-invoke-method pLTs "delete" "LTtobeDeleted") )
humm, maybe a must better understanding of spelling? "Rudy Tovar" <> |>I've got a must better understanding David