Repository navigation
Expand file tree
/
Copy pathQR code.html
More file actions
82 lines (73 loc) · 4.23 KB
/
Copy pathQR code.html
File metadata and controls
82 lines (73 loc) · 4.23 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="This Dynamo script automates the process of extracting element data from a Revit model, using a Python script to generate a custom "QR code" image representing that data." />
<title>Dynamo/ Creating a QR code</title>
<link rel="stylesheet" href="styles.css">
<script src="ap.js" defer></script>
</head>
<body>
<header class="site-header">
<div class="nav-inner">
<a class="brand" href="index.html">Radhakrishnasha</a>
<nav class="main-nav" aria-label="Primary Navigation">
<a href="index.html">Home</a>
<a href="dynamo.html">Dynamo</a>
<a href="families.html">Revit Families</a>
<a href="3dmodel.html">3D Models</a>
<span class="theme-control">
<label class="theme-switch" for="checkbox">Dark Theme</label>
<input type="checkbox" id="checkbox">
</span>
</nav>
</div>
</header>
<main class="container container--narrow">
<header class="page-header">
<span class="badge">Dynamo Script Breakdown</span>
<h1>QR code from element data</h1>
</header>
<section class="content-card">
<p class="body-copy">
This Dynamo script automates the process of extracting element data (specifically "Furniture" element IDs) from a Revit model, using a Python script to generate a custom "QR code" image representing that data, saving it to a designated folder directory, and finally reading and previewing the generated QR code image directly within Dynamo.
</p>
<img class="showcase-image" src="QR code.jpg" alt="Dynamo graph for generating a QR code from element data">
<div class="actions">
<a class="btn btn-primary" href="QR code.jpg" download>Download image</a>
<!--<a class="btn" href="section form scope box.dyn" target="_blank" download>Download Dynamo script</a>-->
<a class="btn" href="Dynamo.html">Dynamo</a>
</div>
<div class="step-list">
<div class="step-item">
<strong>1. Element Data Extraction (Bottom Branch)</strong> Categories & All Elements of Category: The script starts by selecting the <strong>"Furniture"</strong> category and pulling all furniture instances present in the Revit project.<br>
Element.Id: Extracts the unique element IDs for each of the selected furniture items to serve as the data payload for the QR code.
</div>
<div class="step-item">
<strong>2. Directory Path Configuration (Top Branch)</strong> Directory Path & String from Object: The user specifies a target folder path on their computer (e.g., on the Desktop inside a <code>dynamo</code> folder) where the generated QR code image file will be saved. This path is converted into a string format so it can be read by the script.
</div>
<div class="step-item">
<strong>3. QR Code Generation (Middle Section)</strong> Python Script: This node takes the directory path (<code>IN[0]</code>) and the element IDs/data (<code>IN[1]</code>) as inputs. It executes custom Python code to encode the data into a QR code graphic and saves it as a <code>.png</code> file (such as <code>1245858.png</code>) in the specified folder.
</div>
<div class="step-item">
<strong>4. Image Loading and Preview (Right Section)</strong> File From Path:** Takes the file path of the newly generated QR code image.<br>
Image.ReadFromFile: Loads the saved image file into Dynamo as a bitmap object (<code>System.Drawing.Bitmap</code>).<br>
Watch Image: Displays a visual preview of the generated QR code directly in the Dynamo workspace.
</div>
</div>
</section>
</main>
<footer class="site-footer">
<div class="footer-links">
<a class="footer-pill" href="index.html">Home</a>
<a class="footer-pill" href="Dynamo.html">Dynamo</a>
</div>
<div class="contact-row">
<a href="mailto:radhakrishnasha@gmail.com">mail</a>
<span>•</span>
<a href="http://www.linkedin.com/in/radha-krishna-sha-9a66b524b" target="_blank" rel="noopener noreferrer">Linkedin</a>
</div>
</footer>
</body>
</html>