Spaces:
Sleeping
Sleeping
File size: 6,363 Bytes
1d81467 cafcf3b 1d81467 cafcf3b 1d81467 cafcf3b 1d81467 cafcf3b 1d81467 cafcf3b 1d81467 cafcf3b 1d81467 cafcf3b 1d81467 1d163df cafcf3b 16f1caa cafcf3b 16f1caa cafcf3b 16f1caa cafcf3b 16f1caa cafcf3b 16f1caa ab80863 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
import streamlit as st
# Set up the page configuration
st.set_page_config(page_title="AutoCAD Command Explorer", layout="wide")
# Commands categorized by functionality (add as many as necessary)
commands = {
"DRAWING": {
"3DORBIT": {
"description": "Rotates the view in 3D space around a pivot point.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-3DORBIT"
},
"LINE": {
"description": "Creates straight line segments between two points.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-LINE"
},
"CIRCLE": {
"description": "Creates a circle based on a center point and radius.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-CIRCLE"
},
"ARC": {
"description": "Creates an arc defined by three points.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-ARC"
},
"SPLINE": {
"description": "Creates a spline curve through a set of points.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-SPLINE"
}
},
"MODIFYING": {
"MOVE": {
"description": "Moves objects a specified distance in a specified direction.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-MOVE"
},
"COPY": {
"description": "Copies objects a specified distance in a specified direction.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-COPY"
},
"ROTATE": {
"description": "Rotates objects around a base point.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-ROTATE"
},
"SCALE": {
"description": "Scales objects proportionally from a specified base point.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-SCALE"
},
"EXPLODE": {
"description": "Breaks a compound object into its constituent objects.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-EXPLODE"
}
},
"DIMENSIONS": {
"DIMLINEAR": {
"description": "Creates a linear dimension between two points.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-DIMLINEAR"
},
"DIMRADIUS": {
"description": "Creates a dimension that measures the radius of a circle or arc.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-DIMRADIUS"
},
"DIMDIAMETER": {
"description": "Creates a dimension that measures the diameter of a circle or arc.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-DIMDIAMETER"
}
},
"VIEWING": {
"ZOOM": {
"description": "Changes the view of your drawing to a specific zoom level.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-ZOOM"
},
"PAN": {
"description": "Pans the view of your drawing.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-PAN"
},
"3DVIEW": {
"description": "Sets the 3D view angle and position.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-3DVIEW"
}
},
"LAYER_MANAGEMENT": {
"LAYER": {
"description": "Manages drawing layers and their properties.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-LAYER"
},
"LAYERSTATE": {
"description": "Saves and restores layer settings.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-LAYERSTATE"
}
},
"OTHER": {
"UNDO": {
"description": "Reverses the last action or command.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-UNDO"
},
"REDO": {
"description": "Reapplies the most recent undone action.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-REDO"
},
"SAVE": {
"description": "Saves the current drawing to a file.",
"link": "https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-SAVE"
}
}
}
# Custom CSS for styling
st.markdown("""
<style>
.stApp {
background-color: #e6f0ff;
}
.title {
font-size: 36px;
color: #003366;
text-align: center;
font-weight: bold;
margin-bottom: 30px;
}
.desc-box {
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
margin-top: 20px;
}
.desc-title {
font-size: 24px;
color: #003366;
font-weight: bold;
margin-bottom: 10px;
}
.desc-text {
font-size: 16px;
color: #333333;
}
.desc-link a {
font-size: 15px;
color: #0077cc;
text-decoration: none;
font-weight: bold;
}
</style>
""", unsafe_allow_html=True)
# Title
st.markdown('<div class="title">π AutoCAD Command Explorer</div>', unsafe_allow_html=True)
# Filter categories
categories = list(commands.keys())
# Category filter dropdown
category = st.selectbox("Select a Category:", categories)
# Get the list of commands from the selected category
category_commands = commands[category]
# Command dropdown in selected category
selected_cmd = st.selectbox("Select a Command:", sorted(category_commands.keys()))
# Layout: Description on the right
col1, col2 = st.columns([1, 2])
with col1:
# Show description and link of the selected command
cmd = category_commands[selected_cmd]
st.markdown(f"""
<div class="desc-box">
<div class="desc-title">π οΈ {selected_cmd}</div>
<div class="desc-text">{cmd['description']}</div>
<div class="desc-link">
π <a href="{cmd['link']}" target="_blank">Learn More</a>
</div>
</div>
""", unsafe_allow_html=True)
|