Jump to content
Developer Wiki and Function Reference Links ×

How do I write Marionette PIO Parameters into database records / worksheets?


Olaf Pfeifer

Recommended Posts

Hi, 

sorry, but I cannot find out how to write my marionette object's parameters into database records (or worksheet cells), which was my reason to create them – can someone point me in the right direction? I wasn't able to find example scripts ...

 

My objective is to create a door schedule that uses simple,  2D, self-made, non-IFC door symbols with data stamps, to be placed on 2D-drawings (draftsperson does not use walls, just lines). Most parameters will be strictly database records that never appear on the drawing, but WIDTH, WALL THICKNESS, and OPENING DIRECTION (L/R) should be 'hard-wired', i.e. taken from the plan, in order to avoid common mistakes. My first approach was to calculate opening WIDTH and wall thickness from the bounding box of the door symbol/group. This works fine, but only as long as the wall layout is strictly cartesian and the doors are not rotated or mirrored. Also, we would like to use door symbols that are larger than the opening width (including frames etc.), so we would no longer be able to calculate the width from the bounding box, wich seems to be all a worksheet can access. Or is there a way to access data from objects INSIDE a group that is listed on a worksheet?

 

So I created a marionette object that draws the door opening based on parameters, because I expected it would be easy to access those parameters from a worksheet or to write them to an attached database record ... but I find that task surprisingly difficult. Am I missing something?

 

So far, my marionette network, run as a wrapper, can draw a door based on two parameters OPENING WIDTH and WALL THICKNESS, and attempts to attach a pre-defined database record to that object, where it correctly fills the fields for wall thickness and opening width. However, the result is a simple group (not a PIO, so it cannot be manipulated by parameter later), and it is nested twice in otherwise empty groups, unnecessarily. 

If I convert the wrapper into an object node, it becomes the expected parametric plug-in-object that I can modify later, but it does not attach a database record to itself or writes its data to a record that I attach manually. 

 

What am I doing wrong?

 

 

test door database.vwx

 

desired door symbol.png

 

this is what the door symbol plus tags should look like

 

object node so far.png

 

this is my marionette object node (so far, without tags, but okay ... if it only wrote to the database !!!

 

script.png

Edited by Olaf Pfeifer
spell check & fine tuning :-)
Link to comment
  • Marionette Maven

Hi! So if you want to attach the record to the outer container (the Marionette Object) you should use the PIO Handle node (Parent PIO when placed in the drawing)

Wire that into the hObj port of the Set Record Field node and then tie the network together with a pass node at the end.

 

I think this is what you're hoping for?

 

 

Screen Shot 2019-10-28 at 11.16.56 AM.png

  • Like 2
Link to comment

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.

Guest
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.

×
×
  • Create New...