Understand the ExtNodeId extension (1) 1. Install the ExtNodeId scripted extension 2. Open the nodeIds project 3. Load the ExtNodeId extension and open Mechanical 4. Insert the NodeIds ACT result – Change the scoped geometry (optional)
Stage 1 • Changes in XML side: – Copy-paste the <entry> node to add a new button in the toolbar • Remember to change the name and icon etc. – Copy-paste the <result> node to add a new result • Remember to change: – Name, Icon – location attribute (from “node” to “element”) – evaluate callback • Changes in Python side: – Copy-paste the onclick function • Remember to change the name as defined in XML • Remember to change the result name in CreateResultObject() – Copy-paste the evaluate function • Remember to change the name as defined in XML • Remember that now element IDs are collected and hence change the loop and make the appropriate changes in the code. • Reload the extension Look at the Developer’s Guide for <result> and <property> Also review: 11-Walkthrough a custom result extension (Workshop-6)
Stage 2: Python changes • Copy the onclick function • Make sure to : • Change the name • Change the result object name
• Copy the evaluate function
• Make sure to : • Change the name • Read the “U” result and access it for all selected nodes • Set the value for display as the (node number * x-displacement) • The results must always be converted to SI units