Hyperworks Utility Tab- Error in Tcl Code

Michael Siemens
Michael Siemens New Altair Community Member
edited October 2023 in Community Q&A

Hi,

I am currently trying to make a button, that is like the combine tool, to make a tangent to tangent trim in the surface they are on.

image

I am using the "hm_getdirectionpanel" to select two points along each of the lines to get a direction vector, however when I try to create a vector from the x, y and z co-ordinates/direction the "hm_getdir..." command spits out, there is an error message that the created vector has zero magnitude. 

Attached is the code I used to try and fix what I thought was the problem, but I am still getting the same message.

image

Any suggestions would be helpful and appreciated.

Thanks,

Michael

2.PNG 8.7K
Tagged:

Best Answer

  • Michael Herve
    Michael Herve
    Altair Employee
    edited October 2023 Answer ✓

    Hello Michael,

     

    what about the lines below:

     

    set direction [join [hm_getdirectionpanel "Select Line 1 Direction to make tangent to"]]

    eval *createvector 1 $direction

     

    Does it help?

     

    Best Regards,

    Michael

Answers

  • Michael Herve
    Michael Herve
    Altair Employee
    edited October 2023 Answer ✓

    Hello Michael,

     

    what about the lines below:

     

    set direction [join [hm_getdirectionpanel "Select Line 1 Direction to make tangent to"]]

    eval *createvector 1 $direction

     

    Does it help?

     

    Best Regards,

    Michael

  • Michael Siemens
    Michael Siemens New Altair Community Member
    edited October 2023

    Hello Michael,

     

    what about the lines below:

     

    set direction [join [hm_getdirectionpanel "Select Line 1 Direction to make tangent to"]]

    eval *createvector 1 $direction

     

    Does it help?

     

    Best Regards,

    Michael

    Hi, 

     

    Yes, thanks! 

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.