I was wondering if i can set the ambient lighting to 1 by default. its always at .54 for some reason and this is rather dark in some occasions
I don't recommend that. When the lighting (of all lights together) is > no shadow will be displayed.
And in my opinion it will be to bright. But it depends also on the scene, the backgroud and some more parameters, if the lighting is good or not.
In case you speak German, here is a little video on YT about this topic:
SOLIDWORKS Tipps für die Darstellung von Teilen/Baugruppen; relevante Einstellungen, Bühnen, Licht. - YouTube
In case you'll like to it set anyhow, you have to change this value in your document templates for parts and assemblies. With this said, every part/assy has inherited it's own setting and could not be updated trough this change.
The far better way is, to create your own scene with some additional lights, backround settings and so on, and define this as your default scene.
i talked about the problem of the bad DOT default settings (plus, it exist many differents DOT, not all the same)
without having to use "scene"
you can simply add 2 or 3 "Directionnal Lights"
as Heick said, you will have to save your DOT, after lights corrections.
example : (the angles for dir-light can be change, it's just a personnal choice)
checkbox 1 = on
color = white
value = 0.3
Directionnal light 1
checkbox 2 = off
values = 0.1 / 0.3 / 0.3
position checkbox = off
values = +20 deg / +20 deg
Directionnal light 2
values = 0.05 / 0.2 / 0.3
values = -150 deg / +40 deg
Directionnal light 3
values = 0.07 / 0.3 / 0.3
values = -40 deg / +20 deg
You could use something like this to edit your existing files. I use this script to toggle scenes and light properties. In its current state it will disable all solidworks lights except ambient and then turn ambient up to 1.
Dim swApp As ObjectDim swModel As ModelDoc2Dim Scene As SldWorks.SWSceneDim swConfig As SldWorks.ConfigurationDim P2SFilename As StringDim newSceneName As StringDim nLightCount As IntegerDim vLightProp As VariantDim dr As DoubleRecDim i2r As Int2RecType DoubleRec dValue As DoubleEnd TypeType Int2Rec iLower As Long ' Assuming that a C int has 4 bytes iUpper As LongEnd TypeSub main()Set swApp = Application.SldWorksSet swModel = swApp.ActiveDocSet swModelDocExt = swModel.ExtensionSet swConfig = swModel.GetActiveConfigurationSet Scene = swConfig.GetScene'detect name of active scene and step to next scene'https://help.solidworks.com/2015/english/api/sldworksapi/Get_and_Set_Scene_Properties_Example_VB.htmScene.GetP2SFileName P2SFilenameIf InStr(P2SFilename, "basic.p2s") Then newSceneName = "Z:\Video & images\Appearances\Scenes\basicDark.p2s"ElseIf InStr(P2SFilename, "basicDark.p2s") Then newSceneName = "Z:\Video & images\Appearances\Scenes\dark scene.p2s"ElseIf InStr(P2SFilename, "dark scene.p2s") Then newSceneName = "Z:\Video & images\Appearances\Scenes\basic.p2s"Else 'some other scene so step into basic newSceneName = "Z:\Video & images\Appearances\Scenes\basic.p2s"End If'disable all solidworks lights and turn on ambient all the waynLightCount = swModel.GetLightSourceCountFor i = 0 To nLightCount - 1 vLightProp = swModel.LightSourcePropertyValues(i) 'http://help.solidworks.com/2016/English/api/sldworksapi/Turn_Lights_On_Example_VB.htm If InStr(swModel.GetLightSourceName(i), "Ambient") Then 'turn it on i2r.iLower = 0 i2r.iUpper = 0 LSet dr = i2r 'For j = 0 To UBound(vLightProp) - 1 'use to explore data structure 'Debug.Print j & " " & (vLightProp(j)) 'Next j vLightProp(15) = 1 'set ambient light level to 1 Else 'suppress i2r.iLower = 1 i2r.iUpper = 1 LSet dr = i2r End If vLightProp(17) = dr.dValue swModel.LightSourcePropertyValues(i) = vLightProp 'apply changesNext iresult = swModelDocExt.InsertScene(newSceneName)'Debug.Print (result & " " & newSceneName)'Debug.Print (" ")result = swModel.ForceRebuild3(True)End Sub
Retrieving data ...