# Place box based on picture

**URL:** <https://forum.dynamobim.com/t/place-box-based-on-picture/28655>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 19, 2018, 9:20pm UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655 "2018-11-19T21:20:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jschneck](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jschneck](https://forum.dynamobim.com/u/jschneck)\
**Post date:** [November 19, 2018, 9:20pm UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655/1 "2018-11-19T21:20:21Z")

</div>

I work for an electrical contractor and we get tons of drawings that look like this:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c7edff3a816214b715ff60d0019ad59c6e9ce7f6.png)

This little annotation here is a power receptical:

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/892d503732cf7c0aebf19877756b0d2c7781dfd9.png)

Which is basically this:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/3/03f24261dddba0d4e835149789d5fd3f03da90cc.jpeg)

One of the things I do all the time is print out the pdf into a png format and put it as a background file in Revit. I then put a premade family for that receptical on all each symbol (all normal so far).

My question is this: Is it possible to write something in dynamo so that I can press a button, it’ll look at the picture, find the symbol and put a box down at each one? If so where to start? I’m more then willing to do all the work on this if someone can just point me in the right direction.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 19, 2018, 11:28pm UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655/2 "2018-11-19T23:28:54Z")

</div>

Can you provide a sample PDF? I have an idea.

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [November 20, 2018, 12:15am UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655/3 "2018-11-20T00:15:54Z")

</div>

You should start by looking into the DynamoPDF package on Github. 😉  
I have had some great success implementing these kind of workflows in structural engineering applications.

> **[grevit-dev/DynamoPDF](https://github.com/grevit-dev/DynamoPDF)**
>
> Dynamo PDF Parser. Contribute to grevit-dev/DynamoPDF development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![jschneck](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jschneck](https://forum.dynamobim.com/u/jschneck)\
**Post date:** [November 20, 2018, 1:39pm UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655/4 "2018-11-20T13:39:43Z")

</div>

@jacob.small

Here you go: [E4.1.4 - BP4\_RECEPTACLES PLAN FIRST LEVEL - AREA 4.pdf](https://forum.dynamobim.com/uploads/short-url/hxQ31OfyrLrRw3JetTUmoEF84VC.pdf) (3.2 MB)

@Ewan_Opie

Thanks. I’ll look into it.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 21, 2018, 3:55am UTC](https://forum.dynamobim.com/t/place-box-based-on-picture/28655/5 "2018-11-21T03:55:59Z")

</div>

So it looks as if the package noted above doesn’t read the raw geometry from inside the PDF, focusing mostly on text content. It appears to utilize the [iText api](https://itextpdf.com/itext7/community) to parse the data out of the PDF, which appears to have the desired function but I’m not sure those are converted to nodes in the package yet (least not that I can see). Importing into AutoCAD and reading the DWG via LinkDWG package may be one workaround in the meantime, but the import is SUPER slow so… well I’m still thinking on this one.
