Is there a way to write a custom command to auto-place lights?
I've used chat GTP to write code that I'd like to utilize. I have attached a word file and pdf that I need proof read and corrected. I can have that done.
Below is the code, but I'm not sure if it will format correctly:
'Ask the user to select the room size and ceiling height
Dim roomWidth As Double
Dim roomLength As Double
Dim roomHeight As Double
roomWidth = InputBox("Enter the width of the room in feet:")
roomLength = InputBox("Enter the length of the room in feet:")
roomHeight = InputBox("Enter the height of the room in feet:")
'Calculate the square footage of the room based on user input
Dim roomArea As Double
roomArea = roomWidth * roomLength
'Determine the recommended lighting level for the room based on the ceiling height and room type
Dim lightLevel As Double
Select Case roomHeight
Case Is <= 8
lightLevel = 10
Case Is <= 9
lightLevel = 20
Case Is <= 10
lightLevel = 30
Case Is <= 12
lightLevel = 40
MsgBox "Invalid ceiling height"
'Calculate the number of lights needed based on the room size and the recommended spacing
Dim lightSpacing As Double
If roomArea <= 100 Then
lightSpacing = 48
ElseIf roomArea <= 225 Then
lightSpacing = 64
ElseIf roomArea <= 400 Then
lightSpacing = 80
lightSpacing = 96
Dim lightCount As Integer
lightCount = Application.RoundUp((roomWidth + roomLength) / lightSpacing, 0)
'Determine the optimal spacing for the lights based on the room size and ceiling height
Dim xOffset As Double
Dim yOffset As Double
If roomWidth >= roomLength Then
xOffset = lightSpacing
yOffset = lightSpacing * roomLength / roomWidth
xOffset = lightSpacing * roomWidth / roomLength
yOffset = lightSpacing
'Place the lights in a rectangular or square pattern within the room
Dim lightType As String
lightType = InputBox("Enter the light diameter (4 or 6):")
Dim x As Integer
Dim y As Integer
Dim light As Object
For x = 1 To lightCount
For y = 1 To lightCount
Set light = ActiveDocument.CreateLight("Recessed Can Light", lightType & """", "General")
light.Move (x - 1) * xOffset, (y - 1) * yOffset, roomHeight - 48
'Generate a report or summary of the lighting plan for the room
Dim report As String
report = "Room Size: " & roomWidth & " ft x " & roomLength & " ft" & vbCrLf
report = report & "Ceiling Height: " & roomHeight & " ft" & vbCrLf
report = report & "Recommended Light Level: " & lightLevel & " lux" & vbCrLf
report = report & "Number of Lights: " & lightCount ^ 2 & vbCrLf
report = report & "Light Spacing: " & lightSpacing & " in" & vbCrLf
report = report & "Light Type: " & lightType & """ Recessed Can Light" & vbCrLf
Any help would be appreciated.
Sub PlaceLights.docx Sub PlaceLights.pdf
Maybe a nit-pick, but when I wire up my sconce to a light switch, the auto-wiring goes to the face of the wall sconce globe and not to center of the base, which I would prefer. So, I wind up manually adjusting the arc segment.
My question is what controls/defines the snap points of the electrical wiring tool? Is this something defined in the fixture block?
I started working on a wall niche thinking I wouldn’t have any problem but the more I walk, the more doubts I get.
Here they go a good bunch of questions related to this:
- If I remove the frame of the wall niche I get a brown texture that I want to replace by the one I used on the floor of the room. How can I expand that one inside the niche?
- Then, is it possible to change the color of the wall niche inside (not the whole wall)?
- The same way, is it possible to change the color of part of the wall?
- Now related to the cross section view, it’s almost impossible to select some objects because there are other elements in front of them. How can I do that? And, at the same time, why some objects aren’t visible in this view?
I know; too many questions. Sorry!
I have a pair of questions related to moldings and lights in version X14 of Chief Architect.
I have a basic knowledge about moldings and I don’t know how to build a “molding inside a molding” (pictures attached)? I just created a symbol but it doesn’t look so realistic.
I though about a solid polyline but it doesn’t allow moldings. If I make a molding polyline I can’t rotate it properly.
Another doubt is when I worked with version X12 all lamps in general gave light enough. In version X14 everything looks almost in half-light. I tried to manipulate the data light of lamps getting no results.
Whatever idea will be welcome. Many thanks!
I am fairly new to Chief & even more so to ray tracing. I am attaching a standard rendering (1), a physically based (ray trace) (2), and two CPU ray traces ( one with 1 hour/38 passes, the second with 3 hours). It appears to have a foggy haze over the image. Once you zoom into the image, it appears to be grainy also. How can I brighten and sharpen these images?
I have experience with Twin Motion, Photoshop, Revit, etc. but I have seen some wonderful renders out of Chief. I would love to get there. Any tips?
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now