[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

# Re: obtaining node co-ordinates

- To: femm@yahoogroups.com
- Subject: Re: obtaining node co-ordinates
- From: "James Pawson" <thedatastream@yahoo.com>
- Date: Fri, 22 Aug 2003 07:31:38 -0000
- In-reply-to: <3F44FA69.7070404@ieee.org>
- User-agent: eGroups-EW/0.82

    >There currently isn't a built-in way of doing that, but it would be
    >easy to modify the implementation of the selectnode() command to
    >return the coordinates of the selected node. At the end of the
    >lua_selectnode implemenation in luadoc.cpp, just replace:

    >return 0;

    >with

    >lua_pushnumber(L,thisDoc->nodelist[node].x);
    >lua_pushnumber(L,thisDoc->nodelist[node].y);
    >return 2;
    >
    >and recompile.

    just compiled it this morning, works fine. To test, I drew a random
    node in BELAdraw and openend the LUA console and entered

    golf,golf2 = selectnode(0,0)
    print(golf, golf2)

    It successfully returned to node co-ordinates :-)

    thanks again David
    James

- References:
  - Re: [femm] obtaining node co-ordinates
    - From: David Meeker <dmeeker@ieee.org>

- Prev by Date: Postprocessor error
- Next by Date: Re: Some doubtful in BELA..
- Previous by thread: Re: obtaining node co-ordinates
- Next by thread: how do I model a torroidal transformer ?
- Index(es):
  - Date
  - Thread