PDA

View Full Version : Dwgprops, and vlax functions



JasonSelf
2004-09-03, 06:47 PM
I am trying to write a lisp routine that needs to call the comments found under dwgprops. I know that this is able to be accessed via vba and resides at ThisDrawing.Acad.AcadSummaryInfo.Comments.

Here is what I thought might work
(vl-load-com)
(setq #whatever (vlax-get-properties ThisDrawing.Acad.AcadSummaryInfo.Comments))

This obviously is not the right syntax, mostly because it didn't work :?


Anyhelp would be greatly appreciated as always,
Thanks,
Jason Self

P.S. If this double posts I am sorry, I couldn't find what I though I had posted this morning and figured that I didn't actually submit it.

stig.madsen
2004-09-04, 01:09 AM
In lisp, it's a multistage task to query objects as it doesn't use the dot syntax that VBA uses. These steps will get you to the Comments property:


(setq acad_app (vlax-get-acad-object)
activeDoc (vla-get-activeDocument acad_app)
dwgProps (vla-get-summaryInfo activeDoc)
comments (vla-get-comments dwgprops)
)