All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Aim: To create a code that performs creating midline To create a code that performs creating spot welds Objective: Create a macro to calculate the midline of a given tubular component and combine all the midlines to create a single midline. Create a macro to create…
Akash M
updated on 03 Dec 2021
Aim:
To create a code that performs creating midline
To create a code that performs creating spot welds
Objective:
Create a macro to calculate the midline of a given tubular component and combine all the midlines to create a single midline.
Create a macro to create 1D spot weld for each node pair inappropriate component.
Code:
Part A:
*createlistbypathpanel lines 1 "Select the source lines by path"
set source [hm_getlist lines 1]
*createlistbypathpanel lines 2 "Select the target lines by path"
set target [hm_getlist lines 2]
foreach i $source j $target {
*linescreatemidline 1 1 2 2
*linecombine $i $j 1
}
Part B:
*clearmarkall 1
*createlistbypathpanel nodes 1 "Select the source nodes by path"
set source [hm_getlist nodes 1]
*createlistbypathpanel nodes 2 "Select the target nodes by path"
set target [hm_getlist nodes 2]
foreach i $source j $target {
*elementtype 5 1
*rigid $i $j 123456
}
Procedure and Code explanation:
Part A - Midline:
*Createlistbypathpanel command is used to select the entities by using entity panel. This creates a list of selected entities in a way we select the order. Line list will be selected.
The first set of lines are saved as a source and the second set of lines are saved as a target.
foreach loop is used to create midline for a each source lines and target lines and then the lists are assigned to variables.
*linescreatemidline is used to create misline. Midline is created for between source lines and target lines.
Part B - Spot weld:
*Createlistbypathpanel command is used to select the entities by using entity panel. This creates a list of selected entities in a way we select the order. Node list for weld location will be selected.
The first set of nodes are saved as a source and the second set of nodes are saved as a target.
And then foreach loop is used to create weld for each source nodes and target nodes
To create rigid *rigid node 1 node 2 dof command is used. Inputs are node 1 i.e.source node, node 2 i.e.target node and dof 123456
Output:
Part A:
Part B:
Conclusion:
Sucessfully created a macro created that performs creating midline and also created a macro that performs creating spot welds for user defined node list.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project - 2 - Generating the report for hypermesh file
Aim: To generate the report for hypermesh file Objective: To create an ergonomic and visually appealing excel (.xlsm) report that contains following information about your model: User name, date, time Profile/deck; count of component, prop, material, elements Count of empty comp/prop/mats Elements…
20 Dec 2021 07:48 AM IST
Project 1- Building a Master TCL/TK Macro
Aim: To create a master TCL/TK macro that performs several operations such as finding and correcting normals, final checks, creating components, reflecting geometry, creating connections and identify identical components. Objective: It should contain buttons that will call all utilities created as assignments during…
10 Dec 2021 05:13 AM IST
Week - 9 - Reflecting the geometry
Aim: To create a code that performs reflecting the geometry Objective: Create a macro that will reflect given multicomponent FE part with ease It should be independent of deck The inputs should be original CAD comp, reflected CAD comp and original FE comps …
07 Dec 2021 03:01 PM IST
Week - 12 - Creating the locator, writing and reading the node data
Aim: To create a code that performs connections, identify the identical components and reading nodes from a file. Objective: Create a macro that builds a GUI containing 4 buttons. Component creator, weld, xloc, yloc, zloc. Upon pressing the buttons corresponding 1D element must be created…
07 Dec 2021 12:35 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.