🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

how to automaticaly create property for each beam_section

User: "Xavier"
Altair Community Member
Updated by Xavier

is there any way to create to properties for the imported beam_sections  Pbar card image

the id number is maintained properly, 

i have manually done for some values, in actual model there is a lot of values

a sample file hm file is attached for better understanding.

and test.hm file is shared, where properties needs to be created.

 

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "tinh"
    Altair Community Member
    Accepted Answer
    Updated by tinh

    Hi,

    try this script:

    *createmark beamsects 1 all foreach bsId [hm_getmark beamsects 1] { 	set dim1 [hm_getentityvalue beamsects $bsId beamsect_dim1 0 -byid] 	set prop_name dia_[string trimright [format %.3f [expr 2*$dim1]] 0] 	*collectorcreateonly properties "$prop_name" "" 11 	*createmark properties 2 -1 	set prop_id [hm_getmark props 2] 	*dictionaryload properties 2 "[hm_info templatefilename]" "PBAR" 	*attributeupdateentity properties $prop_id 3179 1 2 0 beamsects $bsId 	*attributeupdateint properties $prop_id 3240 1 2 0 1 	*attributeupdatedouble properties $prop_id 72 1 2 0 0 	*attributeupdatestring properties $prop_id 130 1 0 0 "" 	*attributeupdateint properties $prop_id 108 1 2 0 0 	*attributeupdateint properties $prop_id 3899 1 2 0 0 }

    Tested on HM2019

    image