PDA

View Full Version : Variable for current ctb file



scott.wilcox
2006-06-27, 10:21 PM
Does anyone know if there is an AutoCAD variable that stores the name of the ctb file assigned to the current layout tab (CTAB)?

I would like to embed it into a diesel string; the PSSTYLEMODE is 0 and PSSTYLEPOLICY is 1.

Thanks,
Scott

rkmcswain
2006-06-27, 10:48 PM
No sysvar that I am aware of.

You could consider using the following code to set one of the USERS? sysvars, then reference it.



(vla-get-Stylesheet
(vla-get-activelayout
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)

scott.wilcox
2006-06-28, 04:30 PM
Thanks, I'll give it a go.

OK, it works, but I have to load it after I switch layout tabs for AutoCAD to read the current CTB file. Is there a way to have this update (a reactor, perhaps?) when switching tabs?

Scott