Dynamic drawing based on Access data

Started by AggKat, March 14, 2019, 08:33:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AggKat

I am a newbie to Visio.  I have been a CAD designer for over 25 years, so a little different for me.  I created and Access database that would automatically create and modify drawings based on information in Access.  I created a template drawing in AutoCAD and used the graphics as a backdrop in Access reports with the fields placed on top of it.  The users makes there selection and selects the drawing button and depending on what equipment is contained on the called query, it selects the correct template report and populates the data.  That has worked fine for many years, but recently they are requiring more variables added to the drawings which strays away from the normal templates.  I reworked the database to now use Visio and Data links.  So far I can populate the drawings.  The problem I am having is that, say if one of the queries does not contain any equipment for this particular drawing and produces null values I get a conflict.  What I would like to do is have all the shapes (components of any given location) in the drawing and depending on the tables that Access produces, auto toggle layers on and off.  If the table has null value because the equipment is not contained on that location then that layer (say an oil tank) will be turned off.  If the oil tank is present on the location and in the table then it turns the layer on.  This would allow me to have one template instead of 40 and having to code which template to use based on criteria.  I would also like to ignore the conflict error, so the end user will not see it.   Thanks in advance for any help. Keith

Surrogate


AggKat

Yes have already connected to my database and populating the shapes with the data from Access.  I am now wanting to do something like and if statement in the shape sheet to say if X is NULL then turn Y layer off, else populate based on Access.


AggKat

Thanks for the reply.  I will look at the link and see if I can modify for my needs.

wapperdude

Unless I missed something, seems all you need is extra couple lines of code...As you read database, check for null data and set layer visibility to zero.

Wapperdude
Visio 2019 Pro