Jump to content
Sign in to follow this  

Dynamic Image Link

Recommended Posts

Hi all,


I'm revisiting our Title Block at the moment. While I'm at it, I'd like to add a feature that we (similarly) used to have in AutoCAD:

The Title Block comes with a field for the client logo - That naturally keeps changing.

Right now, we're just dragging in JPEGs and manually scaling them - I'm not a big fan of that.


The first option that comes to mind is the one I'm using for language options:

Have every option in a different class and turn on/off the visibility accordingly.

However, that just bloats up the template file and we have to adapt the template everytime we have a new client.


I'd like to have a little Marionette Node that does the following for me:

- Look Up a specific network folder

- List all contained image files as options to chose from

- Create a linked image based on the selection

- Find the maximum in width/height and scale to fit the "frame"


Is that doable?

Any hints to VS functions I should check out for this?


Thanks to all in advance!

Share this post

Link to post

Hi, Try this one, its a simple one. You will obviously have to create your own client logos etc but the principal is the same. Will look at a few other ways to do this like a dropdown menu.

Title block_001.vwx


Edited by Alan Woodwell

Share this post

Link to post

Hi Alan,


thanks for the quick example.

Unfortunately, it's not a ideal option as I'm still having to edit my template anytime we have a new client.


In the meantime I've found out how to create symbols from images in a folder by studying this example:


So far, so good. Now I only need to have a method for selecting the correct symbol.


Having the loop additionally create a list of all options is one line added to the code.

However, populating a Pop-Up GPIO object with this list won't work as far as my research goes... I hope someone disagrees with me here ;)


Share this post

Link to post

Hi Alan,


thanks for the support.

I've gone down a little different route with this now:

Instead of searching through a folder, there just needs to be a "ClientLogo.jpg" in the same directory as the document. Still better than what we used to do.




Share this post

Link to post

Hi Hannes

A referenced Image, with a relative path, nearly could do that. But with a new image, the scale would be wrong. So you're right, searching an automatism with marionette.

Maybe the attached Node/Example can help yo to realize that. I do not know exactly, how you want to Link your Drawing to the logo. So maybe this needs to modified. The Attached Node supports the following options:

1. Path Name Absolute

2. Path Name automatically to the drawing path and automatically takes jpg with the same name like the drawing.

The Node scales the image to a fixed x-value and scale from the middle. Maybe there needs to be modification to get exactly what you want to have.




Share this post

Link to post

Hi Dom,


thanks for you support.

I maybe wasn't clear on my last post: My script is already done! It looks quite similar to your approach :) Anyway, as said I'm only linking to one specific file path in the document's directory.


Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...