PDA

View Full Version : Need help creating custom to/from arrows...



robinsjg
01-18-2011, 01:27 PM
I am attempting to create a custom To/From Arrow for a client and I have run in to a number of issues.

One problem I am having is creating the attribute text blocks. I created my own that incorporates a number of other fields from the database. However, as soon as I place the arrow and select a direction, I get the following error:

ERROR bad argument type: 2D/3D point: (nil 2.8125)

The number at the end, 2.8125 in this case, is always simply the Y value of the location where I attempted to place the arrow.

Does anyone know what this means? As soon as I switch the attribute text block back to the default one, it works fine.

And can anyone explain exactly how the blue insertion points work? I don't see any rhyme or reason to how AutoPlant is placing the text. I am trying to get it to all line up neatly within the arrow symbol, but I can't figure out what exactly it's doing.

And lastly, I noticed that when I use the default attribute text block, which just has MDOC_NAME, the database does not actually populate that field with the correct drawing number. The drawing number shows up in the arrow, but in the database, the MDOC_NAME field (in the PID_TOFR table) is empty. This doesn't make any sense to me. Where is it getting that value? I need to do embedded value LISP functions on the drawing number to split it up and display it on two separate lines, but I can't split it up if there is no drawing number to operate on!

Aplant Monkey
01-18-2011, 02:32 PM
you are experiencing the reason why I don't use any of the OPC's that Bentley provides. I have created my own attributed blocks that populate and are avail for the users to fill in. the time lost with this process compared to the headaches that accompany the OPC's is just not worth it. Besides if you link your process lines properly you don't need to have the drawings connected. IMHO

PartRidge
01-18-2011, 04:05 PM
I agree with Brian. Brian, don't fall over. Until you play some with how AutoPLANT P&ID OPCs work it's really hard to manipulate and easier to just create your own. However, it is critical to have the arrows linked even if you don't keep the process continued from each arrow because if either of the drawing names change either drawing's arrows will update automatically the next time the drawing is opened.
The MDOC_NAME is representative of Match Drawing Name and only will populate when you match arrows and it internally stores the doc_reg doc_id and resolves the name via the internal database joins. By default with placing new arrows the matched drawing value is blank, but if you had existing drawings already within your project and selected the Select Drawing Option then the Match Drawing Value is populated.

When you tried to create your custom arrows you didn't inadverantly put something in with a + or - Z coordinate did you? P&ID previously had some issues with this, but I thought Bentley added some code to ignore the Z-coordinate with p&id. The other part is when you created the settings record value did you copy one of the other arrow records so it has the proper internal routine calls?

The blue reference dots during symbol generation are used by the system to identify where the symbol origin is going to be. For OPC arrows this has got me before too because you select near the end of the line to place the arrow, it then asks for arrow direction and either places the arrow the way it was designed or flips the arrow to bring it in the opposite direction, then trims the process line back. So in order for you to get it right you need a symetrical arrow and if it is longer than the default you have to play with the settings for the gap and the attribute, etc.