I added a spotlight throught API and it shows up in the tree the settings are all what I set it is on but yet it doesn't show. If I add one without API it does show, and when I render the API added one it shows as expected. Am I missing something.
Corey Scheich
' C:\DOCUME~1\cscheich\LOCALS~1\Temp\swx2844\Macro1.swb - macro recorded on
05/18/04 by cscheich ' **************************************************************************** ** Dim swApp As SldWorks.SldWorks Dim Part As SldWorks.ModelDoc2 Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Dim LightID As Long Dim LightProps As Variant Dim LightProps2 As Variant Dim NewName As String Sub main()Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
LightProps = Part.LightSourcePropertyValues(2) Part.AddLightSource "CS#1", 2, "Copy of Spot1"
'I tried with and without the next line NewName = Part.AddLightToScene("Copy of Spot1")
Part.LockLightToModel (Part.GetLightSourceCount), True Part.LightSourcePropertyValues(Part.GetLightSourceCount) = LightProps
LightProps2 = Part.LightSourcePropertyValues(Part.GetLightSourceCount)
Part.GraphicsRedraw End Sub