Finding Picked Point on Item

Looking for coordinates of a picked point on an item.

Have used the pick command and the second part of that gives some coordinates on where I picked the item, however the minute I change view in any way the text that I displayed on the screen at that coordinate disappears off into space. Is there another way or a way to pinpoint the coordinate on the the actual selected item ?

Current code used

var !Pick pick
!Gen = !Pick[1].Dbref()
!Pos = !Pick[2].After('Through').Position()


Any help is appreciated

Thanks

  • Found a solution.

    From the !pos get the position component, get the remaining part of !pos and convert to a directon.
    Create pointvector from the above 2 vars
    Create plane on the object you want to find the picked position
    Find intersection of pointvector and plane

    Job done !

  • Hello, its good to hear that you found a solution.

    I honestly did not understand the question so I am curious about this.
    I also am not familiar with the command var !Pick pick
    May I ask if it is also possible to get the coordinate using IDP@?

  • So there is a command in PML called pick. It returns a point and a direction. I initially thought that point was on the item you pick, but it's actually not. Not sure how it derives the point exactly, but it seems to be in line with how you view the model at the time and the actual point is beyond the item. Below is what it returns. From there you can use the info as per what I previously posted.

    <ARRAY>
    [1] <STRING> '=42038/9'
    [2] <STRING> 'Line N 15.2789 E 30.4124 D Through E 341491 N 102142.023 U 531967.625'

    So I create the pointvector from the above and then create a plane on the item I'm interested in and then get the intersection. That intersection is the exact location of where you picked on the item. Good for labelling an item

  • Thanks for the explanation.
    I understand it now.

    I just remembered that the new Event Driven Graphics (EDG) functionality is introduced to supersede the PML pick method.

    The Query Position form (E3D Version 2.1) found in the Home tab -> Measure group is powered by EDG.
    I think it is possible to call in PML of the button in the form with the following:
    !!queryposition.pickpositionmethod()
    The picked position can be queried by q var !!queryposition.poscontrol.xyz()

    I think we can also refer to the code inside queryposition.pmlfrm if we are going to make our own customized  EDG code when we need the user to identify points in the Model.

  • That's ok. Yes EDG I have been looking at that for another program I am writing and I don't like how it works. Horrible. Why make something simple when you can make it difficult LOL
    I've not seen that command that you mention there. Maybe I'm looking in the wrong locations but I don't find the help documents particularly good or plentiful. They lack examples. Maybe it's just me

  • I also find EDG to be difficult to understand. Even now I still don't understand it fully.
    But there are cases that I encountered where EDG becomes the practical choice. One example is that when I need the user to do multiple picks and I need to run something in the background after each pick of the user.

    I also wonder if EDG is also going to be dropped in the future. In the newer version E3D 3.1 released, the EDG powered Query position is replaced with the In-canvas/AutoCAD style query position.  However, other functions like the Piping Editor still uses EDG in E3D 3.1..

    For now, please try:
    show !!queryposition
    !!queryposition.pickpositionmethod()
    and then query the picked position by q var !!queryposition.poscontrol.xyz()

  • Thanks
    That also works, but you get the dialgue box. Having said that, it may be useful for other things I do down the track

    WHere do you go for help and examples ?

  • For specific of Event Driven Graphics, there's two reference

    AVEVA Online Help https://help.aveva.com/AVEVA_E3D_Design/3.1/#/home/962816/10/11
    The traning manual TM-1881 AVEVA Everything3D PML Form Design (Copyrighted but can be requested from your AVEVA Account Manager / Sales Representative)


    For the Query Position form E3D 2.1 version, you can find the queryposition.pmlfrm in the PMLLIB folder in your computer to view its code.


    In general, the AVEVA Global Customer Support (GCS) is the first place to go. Second place to go is here in our forum. Much better to both contact GCS and post in the forum.

    This is their website https://softwaresupportsp.aveva.com/
    To ask a question, click the Case Management button and then click Create New Case.
    An AVEVA Technical support consultant from your region will reply to you there.

  • Thanks. Interestingly I've never come across that online help before

    I was using this one, which is ok

    help.aveva.com/.../wwhelp.htm

    As for the support line, they ask for some reference from your company or license or something don't they ? I don't represent the company I work for and they won't help without it. I tried to highlight several bugs and it went nowhere because of that. 

  • Sorry but I do not know exactly how the registration for the support works.

    In my case, I sent an email to the AVEVA Support Japan that the Case Management button is disabled in my account in the softwaresupport website. After that, they updated my profile details and it become linked to our Japanese mother company that holds our AVEVA licenses. (Our company in Philippines is a subsidiary.) 

    I believe that registration to the GCS website does not require approval from your company. I think that you just need to email them with your company email.