Fabrication CADmep™ > CADmep™ Users

Lisp/script routine using UPDATECUSTOMDATA

(1/1)

CADworker:
I'm trying to create a lisp routine that utilizes the UPDATECUSTOMDATA command. I'm attempting to extract a values from a text object, whether it is in the drawing or a xref, then use the UPDATECUSTOMDATA command to add that value into on of the custom data fields on the fabrication object. I have failed time and time again trying to do so.
I have seen a routine do this before but I don't not have access to it to see the code and how it works.

I have hundreds of Chilled Beam ITM's in my drawing and the engineer has tagged them all with separate equipment tags. I'm trying to create a routine that I can select the text and then the fabrication object to add the value in the custom data field that I need it in for reporting and tagging with ctext.

Has anyone created something like this that can help me with this issue?

AN-detail:
Here ya go. Good idea, pretty handy to have around.

I made it so it can grab data from a block with attributes. Our typical equipment tag block has attributes for the top line and bottom line, so this will combine those into a string.

Also, I always tag my fab parts equipment using item number, so I threw that in there using a temp script but I commented it out since you only asked for CDATA. This can be used to write to any other writable property.

Specify your attribute tags, property, and CDATA index in the beginning of the lisp.

(I tried posting inline instead of as attachment, but I was getting a forum error. Code is too long maybe?)

Navigation

[0] Message Index

Go to full version