#1
|
||||
|
||||
Edit and sort BOM table
Hi all
There is a way to sort BOM table by part code? And a way to edit it? I'm using OSD without MM Thanks a lot! |
#2
|
||||
|
||||
Re: Edit and sort BOM table
up........
|
#3
|
||||
|
||||
Re: Edit and sort BOM table
Someone can help me?
|
#4
|
||||
|
||||
Re: Edit and sort BOM table
up........
|
#5
|
||||
|
||||
Re: Edit and sort BOM table
I'm afraid not... the BOM table functionality is fairly limited.
Jaap |
#6
|
|||
|
|||
Re: Edit and sort BOM table
Shaba,
thi is my code to sort the BOM by "codice", "fornitore" and "tipo". the result in the attachment. Code:
(defun ordinaBOM () (sd-hide-display-table "AM-BOM-DATA-DTAB") (AM_BOM_NUMBERS :clear) ;azzera tutte le posizioni (setq ltab (sd-get-display-table-logical-table "AM-BOM-DATA-DTAB")) (setq row-number (sd-get-logical-table-number-of-rows ltab)) (setq i 0) (loop (setq POS_NO (sd-Read-logical-table-cell ltab :row 0 :column :DOCU_BOM_POS_NO)) (when (sd-string/= POS_NO "") (return) ) (setq rowtableDB (sd-read-logical-table-row ltab :row 0)) (setq ENTRY_ID (sd-Read-logical-table-cell ltab :row 0 :column :DOCU_BOM_ENTRY_ID )) (setq lengrow (length rowtableDB)) (dotimes (j lengrow) (if (string= (nth j rowtableDB) ":PART_CODE ") (setq CODICE (nth (+ j 1) rowtableDB))) (if (string= (nth j rowtableDB) ":bom3d-Fornitore-attr-cont ") (setq FORNITORE (nth (+ j 1) rowtableDB))) (if (string= (nth j rowtableDB) ":bom3d-classe-merc-attr-cont ") (setq TIPO (nth (+ j 1) rowtableDB))) ) (if (not FORNITORE) (setq FORNITORE "")) (COND ((OR (and (sd-string/= (sd-string-trim FORNITORE) "") (sd-string= (sd-string-trim Tipo) "XXX")) (sd-string= (sd-string-trim Tipo) "COM") ) (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "A ~a~a~a" (SD-STRING-UPCASE (sd-string-trim FORNITORE)) (SD-STRING-UPCASE (sd-string-trim CODICE)) i ))) ((AND (sd-string/= (sd-string-trim CODICE) "") (sd-string= (sd-string-trim Tipo) "MEC")) (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "C ~a" CODICE))) (T (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "X ~a" i ))) ; (T (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "D ~a~a~a" (SD-STRING-UPCASE (sd-string-trim DESCRIZIONE)) (SD-STRING-UPCASE (sd-string-trim PARTE)) i ))) ) ;COND (incf i) ) ;endloop (AM_BOM_NUMBERS :by_step :on :by_step_start 1 :by_step_incr 1) (setq i (- row-number 1)) (loop (when (< i 0) (return) ) (DISPLAY (format nil "~A gia' presente!" CODICE)) (setq POS_NO (sd-Read-logical-table-cell ltab :row i :column :DOCU_BOM_POS_NO)) (setq ENTRY_ID (sd-Read-logical-table-cell ltab :row i :column :DOCU_BOM_ENTRY_ID )) (setq rowtableDB (sd-read-logical-table-row ltab :row i)) (setq lengrow (length rowtableDB)) (dotimes (j lengrow) (if (string= (nth j rowtableDB) ":PART_CODE ") (setq CODICE (nth (+ j 1) rowtableDB))) (if (string= (nth j rowtableDB) ":bom3d-Fornitore-attr-cont ") (setq FORNITORE (nth (+ j 1) rowtableDB))) (if (string= (nth j rowtableDB) ":bom3d-classe-merc-attr-cont ") (setq TIPO (nth (+ j 1) rowtableDB))) ) (if (not FORNITORE) (setq FORNITORE "")) (COND ((sd-string= (sd-string-trim Tipo) "ASS") (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "~a" CODICE))) ((AND (sd-string= (sd-string-trim FORNITORE) "") (sd-string/= (sd-string-trim Tipo) "MEC")) (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "X~a" POS_NO))) ((sd-string= (sd-string-trim Tipo) "MEC") (AM_POS_CHG_NO :BOM_ENTRY_ID ENTRY_ID :new_pos_no (format nil "~a" CODICE))) ) ;COND (decf i) ) (display :clear-hide) ) |
#7
|
||||
|
||||
Re: Edit and sort BOM table
Thank you!
But it give me error "La variabile FORNITORE non è associata" I think it missing some macro Thank you! Sono anche io dall'Italia! Secondo me mancano delle altre macro per funzionare Hai qualche personalizzazioni su cui gira OSD? Come fai a far comparire quella tabella? Grazie |
#8
|
|||
|
|||
Re: Edit and sort BOM table
Ciao,
devi personalizzare il codice con i tuoi campi, questo è solo un esempio di come ho lavorato per ordinare la tabella. Posso aiutarti se mi mandi l'esportato in excel della tua tabella DB. You must customize the lisp. I can help you if you send me your DB tablet in excel file. |
#9
|
||||
|
||||
Re: Edit and sort BOM table
E' possibile avere a video la tabella come ce l'hai tu nell'immagine allegata?
Grazie |
#10
|
|||
|
|||
Re: Edit and sort BOM table
cosa intendi?
|
#11
|
|||
|
|||
Re: Edit and sort BOM table
Ciao, sarei interessato anche io a mettere in ordine la mia tabella seguendo l'ordine di una colonna. Ho allegato l'esportazione della tabella in excel.
Vorrei riuscire ad ordinare la tabella per la colonna :POSCODICE_BOM. Puoi darmi indicazione su cosa modificare? Grazie Ciao |
#12
|
|||
|
|||
Re: Edit and sort BOM table
Quote:
Inoltre chiedo scusa per la domanda forse troppo banale, ma ho sempre utilizzato il PDM con macro etc ed ora a gestire le licenze da solo mi trovo in grossa difficoltà, pertanto chiedevo se questo "code" va inserito nella stringa dei comandi o in un file tipo am_customize ed inoltre come si fa a personalizzare il codice con i campi opportuni? Infine ho notato nell'immagine che riesci a far comparire gli spazi nella descrizione delle parti, usi la versione 20 oppure anche questo è frutto di una comando o di un codice? Grazie per la disponibilità. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|