.StyleSheet and .ConfigName question

.StyleSheet and .ConfigName question

Anonymous
Not applicable
214 Views
1 Reply
Message 1 of 2

.StyleSheet and .ConfigName question

Anonymous
Not applicable
If a layout has the PC3 and CTB assigned to None, I use this code to assign a "default" value. Dim objLayout As AcadLayout Set objLayout = ThisDrawing.ActiveLayout If objLayout.configName = "None" Then objLayout.configName = "CLASER.pc3" objLayout.StyleSheet = "CLASER.ctb" objLayout.RefreshPlotDeviceInfo End If If you look at the Pagesetup dialog after the code is run, both values are set, however the Plot Preview still "looks" like it has None applied. If you select THE SAME EXACT PC3 and CTB from the Pagesetup dialog, press OK, the changes are applied. Is there a "force" save or refresh option that I am missing ? Thanks.
0 Likes
215 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Here's how I got Margins to update after I changed them in my project... it may also work for yours. It does occasionally send the ENTER key into the ether (I think it's when the user runs the macro and then hits keys while it's running) but if the user hits the OK button in the PageSetup box themselves the macro continues on as intended... if you need something more professional, this isn't your answer. > objLayout.configName = "CLASER.pc3" > objLayout.StyleSheet = "CLASER.ctb" > objLayout.RefreshPlotDeviceInfo ' ENTER key sent again to the following page setup dialog box ' this allows the page setup changes to "take" SendKeys "{ENTER}" curDwg.SendCommand ("pagesetup" & vbCr) 'ThisDrawing... > End If >
0 Likes