Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: bradeneuropeArthur

this no ...

 

 

my new functional code:

 

oView = ThisApplication.ActiveView

Dim originalSchema As String
originalSchema = ThisApplication.ActiveColorScheme.Name
Dim originalBkg As BackgroundTypeEnum
originalBkg = ThisApplication.ColorSchemes.BackgroundType
ThisApplication.ColorSchemes.Item("Prezentace").Activate
ThisApplication.ColorSchemes.BackgroundType = 52737 'kOneColorBackgroundType

Dim originSetOff as Boolean
originSetOff = False
If ThisApplication.DisplayOptions.Show3DIndicator Then
 ThisApplication.DisplayOptions.Show3DIndicator = False
 originSetOff = True
End If

Dim picName As String = "C:\Export\" + ThisDoc.FileName(False) + Now.toString("-yyMMddHHmmss") 'timestamp
Call oView.SaveAsBitmap(picName & ".png", oView.Width, oView.Height)

If originSetOff Then
 ThisApplication.DisplayOptions.Show3DIndicator = True
End If
ThisApplication.ColorSchemes.Item(originalSchema).Activate
ThisApplication.ColorSchemes.BackgroundType = originalBkg

'MsgBox(ThisDoc.PathAndFileName(True) & ".png")