Jump to content

Andy@LamteqSolutions

Members
  • Content count

    40
  • Joined

  • Last visited

About Andy@LamteqSolutions

  • Rank
    Advanced Member

Profile Information

  • Country
    United Kingdom
  • Are you University user?
    No

Recent Profile Visitors

908 profile views
  1. Andy@LamteqSolutions

    HYPERMESH - Selecting nodes via Tag Names

    Ok weird... deleted last } then put it back in... now works like a dream!
  2. Andy@LamteqSolutions

    HYPERMESH - Selecting nodes via Tag Names

    Hmmm new problem.... here's my code *createmark tags 1 all set lst_tagIDs [hm_getmark tags 1] foreach tagID $lst_tagIDs { set tagval [hm_getvalue tags id=$tagID dataname=name] set tagNode [hm_getvalue tags id=$tagID dataname=entity] set S1 [string trim $tagval ":"] set tagName [string trim $S1 "N-*"] *createmark nodes 1 $tagNode *renumbersolverid nodes 1 $tagName 1 0 0 0 0 0 } Here's the error.... extra characters after close-brace extra characters after close-brace while executing "foreach tagID $lst_tagIDs { set tagval [hm_getvalue tags id=$tagID dataname=name] set tagNode [hm_getvalue tags id=$tagID dataname=entity] ..."
  3. Andy@LamteqSolutions

    HYPERMESH - Selecting nodes via Tag Names

    Success... set tagval [hm_getvalue tags id=9000003 dataname=name] set tagNode [hm_getvalue tags id=9000003 dataname=entity] set S1 [string trim $tagval ":"] set tagName [string trim $S1 "N-*"] *createmark nodes 1 $tagNode *renumbersolverid nodes 1 $tagName 1 0 0 0 0 0 obviously replace id=9000003 with the foreach command Thanks ever so much for your help
  4. Andy@LamteqSolutions

    HYPERMESH - Selecting nodes via Tag Names

    Tinh and Livil, Many thanks for your help. Livil, the code is struggling (or rather I am struggling) with extracting the Node number the tag is currently applied to... this is what I get. (Documents) 102 % set tagval [hm_getvalue tags id=9000003 dataname=name] N-9004: (Documents) 103 % set tagdata [split $tagval :] N-9004 {} (Documents) 104 % set tagNode [lindex $tagdata 1] list element in braces followed by "" instead of space Now I have tried *createmark tags 1 "by tag name" N-9004: hm_getmark tags 1 (displays the right tag number) *createmark nodes 1 "by tag id" {*}[hm_getmark tags 1] But this seems to go off and find different nodes - and more of them, I was expecting 1 node but it seems to find 49!
  5. Here's a bit of a challenge and certainly one which has bamboozled me so far... Our models need to follow a particular numbering system, we already have a code which quickly renumbers literally everything in the model to a specific number range. But an add on we would like is to be able to rapidly renumber specific node numbers. In the models, we tag nodes with a label like "N-9001" meaning that node number must be 9001 (long story but we work on include files which must slot together so certain nodes must be certain numbers). At the moment this is a manual process but what I would like is a code which could createmark by tag name N9001, then renumber node to 9001. Can this be done? If so, how?
  6. Ah got ya. Thanks again Tinh (apologies, I realise that I actually mis-spelt your name earlier)
  7. What I would like to do is createmark elements by assembly name where assemblies contain the word Apples... *createmark elements 1 "by assembly name" Apples I've tried *createmark elements 1 "by assembly name" "contains value" Apples* 1 but that's not it.... Any ideas?
  8. Awesome Ting, Many thanks again. Cheers Andy
  9. Hi all, Am trying to find a line of code which will select a component / assembly / set etc, when the name contains a certain string... for instance the assembly name may read "apples-001001a" but I want a script to select that assembly if the name contains "apples" as the number could change in the future. Any ideas? Cheers Andy
  10. Andy@LamteqSolutions

    hypermesh scripting - how to get loadcollector names

    Perfect, many thanks
  11. Hi all, Am writing a script which builds a number of loadcollectors and loadsteps. What I would like is a script which interrogates the loadcollector, gets its name and then creates a loadstep with the same name. I can build the loadcollectors and the loadstep but I am missing the interrogation bit. Cheers Andy
  12. Andy@LamteqSolutions

    OPTISTRUCT - Contacts

    Hi all, I have a model with multiple contacts and have been using N2S contacts. I've found that in some of my loadcases, these contacts produce excessively and unrealistically high loads. I've checked to assure there is a sufficient gap between master and slave components and have even tried changing to S2S, PARAM EXPERTNL CNTSTB... in every case the the contact in question remains an unrealistically high stress or another contact which was previously low force suddenly becomes massive. The way I set the models up is to select contact surfaces for both slave and master and select slide option, I don't apply any clearance or srchdis values. Anyone any suggestions? Alas I cannot share the model.
  13. Many thanks Tinh, That's perfect
  14. Hi all, I'd like to create a script which selects 2d elements of less than 5mm and then displays the element numbers on screen. Any ideas anyone? Much appreciated Andy
  15. Hi all, I'd like to create a script which selects 2d elements of less than 5mm and then displays the element numbers on screen. Any ideas anyone? Much appreciated Andy
×