Topic
12 replies Latest Post - ‏2014-01-17T14:17:25Z by GregM_dxler
SystemAdmin
SystemAdmin
3180 Posts
ACCEPTED ANSWER

Pinned topic DXL Scripting : How to add the linkage between one module and the another ?

‏2013-02-08T07:26:52Z |
Hi All,

I am a newbie. Can you please help me to script how to add the linakge between one module to the other?

Thanks & Regards,
Shriraam
Updated on 2013-02-14T10:14:11Z at 2013-02-14T10:14:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3180 Posts
    ACCEPTED ANSWER

    Re: DXL Scripting : How to add the linkage between one module and the another ?

    ‏2013-02-08T11:13:56Z  in response to SystemAdmin
    It can be done in two steps:

    1.) You can just drag the requirement from the current module to the requirement you want to link in other module by opening together.

    2.) You can right click on the requirement in a particular module and selct the option make start.
    Go to the module which you want to link, right click and select make link from start.

    Aslo,You can have a glance in the DOORS reference manual in the help tab.
  • SystemAdmin
    SystemAdmin
    3180 Posts
    ACCEPTED ANSWER

    Re: DXL Scripting : How to add the linkage between one module and the another ?

    ‏2013-02-09T13:30:19Z  in response to SystemAdmin
    There is 3 such scripts on your computer:
    link by attribute
    linkbykey.dxl
    linkbypair.dxl
    • SystemAdmin
      SystemAdmin
      3180 Posts
      ACCEPTED ANSWER

      Re: DXL Scripting : How to add the linkage between one module and the another ?

      ‏2013-02-13T06:44:25Z  in response to SystemAdmin
      Hi,

      Thanks a lot for your help.Can you please let me know how retrieve these scripts?

      Thanks & Regards,
      Shriraam
  • SystemAdmin
    SystemAdmin
    3180 Posts
    ACCEPTED ANSWER

    Re: DXL Scripting : How to add the linkage between one module and the another ?

    ‏2013-02-14T05:17:10Z  in response to SystemAdmin
    Do you want to create one link or many links at a time?
    • SystemAdmin
      SystemAdmin
      3180 Posts
      ACCEPTED ANSWER

      Re: DXL Scripting : How to add the linkage between one module and the another ?

      ‏2013-02-14T06:53:40Z  in response to SystemAdmin
      Hi,

      Thanks. I just need to create a link between one module to the other.

      Regards,
      Shriraam
      • SystemAdmin
        SystemAdmin
        3180 Posts
        ACCEPTED ANSWER

        Re: DXL Scripting : How to add the linkage between one module and the another ?

        ‏2013-02-14T08:52:50Z  in response to SystemAdmin
        Below script will create a link from one module to another

        Module m=current // m is a source module from where link is started
        Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
        Item it=item("here mention path of target module")
        Module m1=module(it)
        Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
        o_source -> "mention here path of link module" -> o_target

        string source=identifier(o_source)
        string target=identifier(o_target)

        print source "\n"target

        Above script will create link between two objects of two different modules. Mention the ID's of objects properly without prefix.

        Regards,
        Hemlata
        • SystemAdmin
          SystemAdmin
          3180 Posts
          ACCEPTED ANSWER

          Re: DXL Scripting : How to add the linkage between one module and the another ?

          ‏2013-02-14T09:36:11Z  in response to SystemAdmin
          Thanks a lot Hemlata.It worked.
        • SystemAdmin
          SystemAdmin
          3180 Posts
          ACCEPTED ANSWER

          Re: DXL Scripting : How to add the linkage between one module and the another ?

          ‏2013-02-14T09:52:32Z  in response to SystemAdmin
          Hello,

          I just now tried it. I am little bit puzzled what should be the path for "Link path" in code.

          Module m=current // m is a source module from where link is started
          Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
          Item it=item("/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone")
          Module m1=module(it)
          Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
          o_source -> "/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone/" -> o_target

          string source=identifier(o_source)
          string target=identifier(o_target)

          print source "\n"target

          It is throwing an error for me.Please help me what i should give in the path.

          Thanks,
          Shriraam
          • SystemAdmin
            SystemAdmin
            3180 Posts
            ACCEPTED ANSWER

            Re: DXL Scripting : How to add the linkage between one module and the another ?

            ‏2013-02-14T10:14:11Z  in response to SystemAdmin
            At the time of creating links you need to give linkmodule name

            o_source -> "path of linkmodule" -> o_target

            when we create links default linkmodule is created in DOORS namely "DOORS links". You can give same default linkmodule name or create another linkmodule and give that path. linkmodule contains linksets.Default linkmodule is automatically created by DOORS in the folder where your module is present. But you can create in different folder also and give path of that linkmodule in above line.
            please refer DOORS reference manual for linkmodule. it will be more helpfull to you inorder to create linkmodule

            Regards,
            Hemlata
            • Thuhin
              Thuhin
              1 Post
              ACCEPTED ANSWER

              Re: DXL Scripting : How to add the linkage between one module and the another ?

              ‏2014-01-17T09:49:50Z  in response to SystemAdmin

              How to write a DXL script to add 20000 objects in a DOORS Module?

              Please advice!!

              Thanks in advance!

              • GregM_dxler
                GregM_dxler
                162 Posts
                ACCEPTED ANSWER

                Re: DXL Scripting : How to add the linkage between one module and the another ?

                ‏2014-01-17T14:17:25Z  in response to Thuhin

                Thuhin,

                You should probably start a new thread, as this request is much different than the existing thread subject.

                To add a bunch of objects, I would use a loop

                int iCnt, iTotal=20000

                Object oCur=current

                Object o

                for (iCnt=0; iCnt<iTotal; iCnt++) {

                   o =create(after oCur)

                   oCur = o

                }

                This will add the number of objects at the same level as the current one.  Note they will look like headers since there is no text in them.

                Hope this helps,

                Greg

  • SystemAdmin
    SystemAdmin
    3180 Posts
    ACCEPTED ANSWER

    Re: DXL Scripting : How to add the linkage between one module and the another ?

    ‏2013-02-14T10:02:05Z  in response to SystemAdmin
    Please help me out what should be mentioned in the Link path.