• Filter
  • Time
  • Show
Clear All
new posts

  • Cncini

    Hallo Leute,

    ich habe meine CNCINI soweit bearbeitet, dass ich mit meiner Vorlage sozusagen ein Neues Programm schreiben kann.
    Ich wollte nur einmal wissen, ob ich die WKP Daten zusätzlich in mein Programmkopf bekommen kann. Ich füge noch Bilder hinzu, damit ihr versteht, worum es genau geht.
    (Daten vom Bild WKP automatisch in Bild CNCINI einfügen)

    Mit freundlichem Gruß

    Attached Files

  • #2
    You can populate the WKP data using PUTVALS. If you hover your mouse cursor over the field you want to populate it should show the field descriptor - for example $D for serial number.
    Neil Challinor
    PC-DMIS Product Owner

    T: +44 870 446 2667 (Hexagon UK office)
    E: [email protected]


    • #3
      Thank you for your answer, but I want to write a comment into the program head. I know how to get the variables. I just wanna know how to put it into my Main Command Buffer as a comment.


      • #4
        I'm not sure I fully understand what you're trying to do. Can you use GETVALS to assign the info from the WKP to CHR variables and then build a TXT or MSG object that you use in your comment?
        Neil Challinor
        PC-DMIS Product Owner

        T: +44 870 446 2667 (Hexagon UK office)
        E: [email protected]


        • #5
          I already get the variables with getvals and I already wrote a TXT. Now I only have to know, how to put the TXT with a command into my program. Let me show you with pictures what I mean.
          How can I put the TXT into my Main Command Buffer without copy and paste? (Nr. 1 into Nr. 2)
          Attached Files


          • #6
            Once you have created your TXT object, you can use INSPRC to add the contents of the TXT to the command buffer.

            INSPRC          (TXT=LDBTXT:mytxt, EOB=N, FRA=1)
            Neil Challinor
            PC-DMIS Product Owner

            T: +44 870 446 2667 (Hexagon UK office)
            E: [email protected]


            • #7
              Thank you for your help. I did it like this.

              ~STR1='! Materialnummer....:'
              ~STR2=' '
              CONCAT (NAM=~KOPF1, STR=(~STR1, ~STR2, ~STR3), RLS=N, INI=Y)

              ~STR4='! Zeichnungsnummer..:'
              ~STR5=' '
              CONCAT (NAM=~KOPF2, STR=(~STR4, ~STR5, ~STR6, ~STR7, ~STR8), RLS=N, INI=Y)

              ~STR10='! Bezeichnung.......:'
              ~STR11=' '
              CONCAT (NAM=~KOPF3, STR=(~STR10, ~STR11, ~STR12, ~STR13, ~STR14), INI=Y)

              ~STR15='! Bemerkung.........:'
              ~STR16=' '
              CONCAT (NAM=~KOPF4, STR=(~STR15, ~STR16, ~STR17), RLS=N, INI=Y)

              CVCHSTXT (CHS=~KOPF1, LIN=1, TXT=KOPF)
              CVCHSTXT (CHS=~KOPF2, LIN=2, TXT=KOPF)
              CVCHSTXT (CHS=~KOPF3, LIN=3, TXT=KOPF)
              CVCHSTXT (CHS=~KOPF4, LIN=4, TXT=KOPF)

              TextToFile (NAM=LDBTXT:KOPF, FIL=C:\Quindos7Lib\Projekt- Programme\KOPF\KOPF.txt)
              PURGE (FIL=C:\Quindos7Lib\Projekt- Programme\KOPF\, KEP=0, SDI=Y)
              INSPRC (TXT=LDBTXT:KOPF, EOB=N, FRA=99)

              I put it into a procedure. Is there any way to hide the procedure?


              • #8
                the comment lines that appear as a 'header' at the top of the command buffer when executing the CNCINI command are a mask (MSK) in the HDB. HDBMSK:PROG$HDR

                You can customize by creating your own MSK:PROG$HDR and placing in lower database, like GDB (Global Database) or UDB (User Database).

                Or you can type the CNCINI command and add the keyword HDR and use a different mask.
                Attached Files


                widgetinstance 190 (Related Topics) skipped due to lack of content & hide_module_if_empty option.