marcello1
11-18-2011, 06:26 PM
I am trying to make a rollout that would allow me to output certain properties of windows or doors based on selection via dropdownlist with no success. See the script below where the dropdownlist and conditional statements if b == "windows" then and if b == "doors" then have been made a comment since I am not being able to make them work :sad: . I am also attaching a scene that I am using for testing the script.
I appreciate any comments. Thanks in advance.
--doors and windows data extraction with UI
rollout dwdeaRoll "Doors & Windows Data Extraction Assistant" width:200 height:100
(
--dropdownlist b "collect data from:" items:#("windows","doors")
button c "collect data"
--if b == "windows" then
on c pressed do
(
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Width %\n" (classof o) o.name o.Width
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Height %\n" (classof o) o.name o.Height
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Depth %\n" (classof o) o.name o.Depth
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Frame_Thickness %\n" (classof o) o.name o.Frame_Thickness
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Glazing_Thickness %\n" (classof o) o.name o.Glazing_Thickness
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Horizontal_Frame_Width %\n" (classof o) o.name o.Horizontal_Frame_Width
--if (b == "doors") then
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Width %\n" (classof o) o.name o.Width
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Height %\n" (classof o) o.name o.Height
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Depth %\n" (classof o) o.name o.Depth
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Frame_Width %\n" (classof o) o.name o.Frame_Width
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Frame_Depth %\n" (classof o) o.name o.Frame_Depth
)
)
createDialog dwdeaRoll
I appreciate any comments. Thanks in advance.
--doors and windows data extraction with UI
rollout dwdeaRoll "Doors & Windows Data Extraction Assistant" width:200 height:100
(
--dropdownlist b "collect data from:" items:#("windows","doors")
button c "collect data"
--if b == "windows" then
on c pressed do
(
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Width %\n" (classof o) o.name o.Width
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Height %\n" (classof o) o.name o.Height
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Depth %\n" (classof o) o.name o.Depth
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Frame_Thickness %\n" (classof o) o.name o.Frame_Thickness
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Glazing_Thickness %\n" (classof o) o.name o.Glazing_Thickness
for o in geometry where hasproperty o "Horizontal_Frame_Width" do format "% % Horizontal_Frame_Width %\n" (classof o) o.name o.Horizontal_Frame_Width
--if (b == "doors") then
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Width %\n" (classof o) o.name o.Width
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Height %\n" (classof o) o.name o.Height
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Depth %\n" (classof o) o.name o.Depth
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Frame_Width %\n" (classof o) o.name o.Frame_Width
for o in geometry where hasproperty o "Leaf_Thickness" do format "% % Frame_Depth %\n" (classof o) o.name o.Frame_Depth
)
)
createDialog dwdeaRoll
