Contents

Need to draw a 2D plan or diagram and integrate it into an Oracle APEX application? Now, you have a great, free office layout planner that’ll allow you to do so – the Pretius Drawing Plugin.

Sometimes, there comes a need to draw a simple 2D floor plan or a diagram that will be directly integrated into Oracle APEX. Let’s say you need to create a plan for a parking lot, a workspace, or a restaurant. Or maybe you want to map a process. So what do you do?

A screenshot showing Pretius Drawing Plugin.

A gif showing Pretius Drawing Plugin.

The first step will likely be to google it. You’ll quickly find out that there are a ton of proprietary software solutions that’ll let you handle this exact case. However, you’ll need to consider the pricing, as they aren’t free. Moreover, there are usually additional limitations. 

Sure, many open-source libraries can help you with this task. Maybe you’ll be lucky and find one that does exactly what you need. You’ll simply integrate it into APEX, make a few changes, and you are good to go. 

Unfortunately, It’s equally possible the road ahead will be a bit more difficult – we went through the same process at Pretius, and we think that we can offer an out-of-the-box APEX solution that can help you with your case. It does not matter if you are an architect in a corporation or just a student trying to make a classroom booking application project – it’ll be useful to you just the same.

Our solution – Pretius Drawing Plugin 

We’ve created an Oracle APEX region plugin that helps you draw interactive 2D plans and can be used, for example, as a parking or workspace planner. You can find Pretius Drawing Plugin on GitHub, along with up-to-date installation and configuration instructions (don’t worry, it’s a very simple process that will only take you a couple of minutes).

A screenshot showing Pretius Drawing Plugin.

After installation, you can use the plugin as an editor to create drawings and an interactive plan with user-defined functions. 

The drawings are made of components that are kept in a table, where users can add/remove components as they need. The plugin operates on an APEX collection, and after saving, all the data can be found in the collection that users define in region attributes.

There are a few ready-made components included, but users can also create and add their own.

A screenshot showing Pretius Drawing Plugin.

Do you need a solution like that but don’t have Oracle APEX developers on your team?

How does the plugin work in practice?

So, how does the plugin work? Well, it’s not rocket science – to show you everything, I’ll just need to create a plan and put some elements on it. 

To keep the visualization simple, I decided to use only divs and drag & drop mechanism, without any complicated coding. So, if I want to create a parking lot, I drag parking spots (components) onto the parking floor (plan). 

A gif showing Pretius Drawing Plugin.

After I drop components onto the plan, I can drag them around, arrange them in the position, resize them, and rotate them as I need.

A gif showing Pretius Drawing Plugin.

Now, I can simply save all the components. I decided to use apex_collection, where the user can define the collection name in region attributes. After I click the save button, all the components and the plan itself will be saved into the collection.

To make the plan interactive, I added customizable on-click functions and classes, which can be set in a region query, component by component. This way, you can reserve a spot in a parking place by clicking on it, but if you click on a wall, nothing happens – of course, it’s up to you to decide since you know best what you need.

A gif showing Pretius Drawing Plugin.

For example, you can set parking spot classes based on availability.

A gif showing Pretius Drawing Plugin.

Conclusion

And that’s about it. As you can see, Pretius Drawing Plugin makes creating plans or diagrams in APEX apps really easy and issue-free. In fact, some may even use it if they’re not overly interested in APEX development and just want a free office layout planner. If you are such a user, you’ll probably want to learn a bit more about APEX, so here are some sources worth checking out:

  1. Oracle APEX tutorial: Uncover Oracle’s best-kept low-code secret
  2. Low-code advantages: 5 reasons to consider it for your company in 2023
  3. 10 low-code myths in 2023 (and how to address them)
  4. How a low-code framework helped Munich Re HealthTech build a data-driven SaaS application – in 4 months & across multiple countries
  5. Oracle APEX new features – the low-code platform keeps evolving

If you want to learn more about the Pretius Drawing Plugin itself, check out the GitHub repo where you can download the plugin and read installation instructions. And if you have any questions, contact me at tkucharzyk@pretius.com (you can also leave suggestions on GitHub if you prefer). Have fun using the plugin!

Last but not least, if you believe that your business might benefit from introducing a sleek office layout planner or a similar solution, make sure to let us know at hello@pretius.com (or using the contact form below). We’ve already delivered such applications for a few of our clients and with over 50 specialists in our Pretius Low-Code team – including conference speakers, plugin creators and a few Oracle ACE experts – we’re really one of the best choices when it comes to Oracle APEX development. Initial consultations are always free, so just drop us a line and let’s talk.

Share