Harry123 Posted July 13, 2017 Share Posted July 13, 2017 Hello, I am trying to create a quick workflow to attach information to a text for different shapes. For example: I have the green shape and I want to show it's area in a text with some more info. My workflow now: (see image) I made a symbol of the text with different record fields. For every shape I click on the shape, write down it's area and then change the number in the record info (level3 in this example). I know there must be a quicker and easier way to automatically link the record info of the text to the object info of the shape (the area of the green shape). So every time I change the shape, the information in the text will change as well. Hopefully someone can help me and save me a lot of time and frustration. Thanks! Quote Link to comment
Hans-Olav Posted July 13, 2017 Share Posted July 13, 2017 Hi Harry I use spaces for task like this Quote Link to comment
Kevin McAllister Posted July 13, 2017 Share Posted July 13, 2017 You could also make a marionette object using your shape as control geometry. You could still edit your shapes easily and marionette could update the area text automatically. Kevin Quote Link to comment
Pat Stanford Posted July 13, 2017 Share Posted July 13, 2017 Or you could use this script from back in 2008. It will update the Area Field in every object in the drawing that has that record attached. Just change the names in the const section to match your record and field names. You will have to rerun the script to get the data to update. Using Spaces or the Marionette option may be better solutions if you truly want live updating. Procedure Area_to_Record; {Stores the area of an object to an appropriate} {field in a record attached to the object.} {March 11, 2008} {© 2008, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} const RecName='PTS_Record'; Field='Area'; Decimals=2; var H1:Handle; R1:Real; Procedure FillRecord(H2:Handle); Begin SetRField(H2,RecName,Field,Num2Str(Decimals,HArea(H2))); End; Begin ForEachObject(FillRecord,((R IN [RecName]))); End; Run(Area_to_Record); Quote Link to comment
Recommended Posts
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.