Recently active
I think many of those who used (or are using) version 19.0 of Drafting, have experienced the faulty operation of colour flags associated with text and line in dimensions editing window.You edit a dimension to check its features, close the window even without changing settings by pressing OK, line and text have now the same colour!Every time you have to uncheck the flags to avoid troubles.I wrote some code to manage this behaviour. The macro has obviously taken over the button of the original one.Should be of some use for anyone, the lines are posted below.The macro saves the current features of dimensions, selects those to be managed (both single click or window), gets line and text colours, open dimensions management. On closing, checks whether line and text colours are the same* (which is the result we don't want): in this case, restores the previous ones. Finally restores the initial status of dimensions environment.1- As far as you don't need to change colours (which is for us the
Hello,let's finish it up!Sketches forms have been created containing tagged elements; these are used for setting print viewports and file names.This macro first checks that all texts tagged as file names with the INFO 'NOMEFILE' are different to avoid overwriting; then requests to select (by clicking on previously created blue frames) the sketches to be printed, writes needed information in a LTAB; takes note of the current printer settings;provides for new settings; prints all requested areas to given path and file names; resets printer settings.Let's see details of the code with usual bold comments.DEFINE STAMPASCHEMINOLOCAL CORNICE LOCAL XCORNICE LOCAL YCORNICE LOCAL XCONFRONTO LOCAL YCONFRONTOLOCAL CONTATORETAB LOCAL CONTATORETAB2 LOCAL CONTATORETAB3LOCAL OLDPRINTER LOCAL OLDPLOTSCALE LOCAL OLDORIENTATIONLOCAL DESTINAZIONE LOCAL NOMEFILEPDF LOCAL NOMEFILEMODLOCAL X1 LOCAL Y1 LOCAL X2 LOCAL Y2LOCAL ORIZ LOCAL VERTLOCAL CHECKNOMI LOCAL NUMELEM LOCAL CONTATORENOMI LOCAL CONTATORENOMI1
Hello!Here follows the second step.The code checks needed information, sets references of the form to be drawn, writes identification INFOS and draws.DEFINE CREASCHEMINOLOCAL SOMMALOCAL CTLCOMPLETEZZALOCAL IDLISTA LOCAL POSLISTALOCAL NOMESCHEMINO LOCAL NOMEPARTELOCAL SLASHPOS1LOCAL FORMX LOCAL FORMYLOCAL PUNTOXY LOCAL PUNTO1 LOCAL PUNTO2LOCAL PUNTO1A LOCAL PUNTO2A LOCAL PUNTO3A LOCAL PUNTO4A LOCAL PUNTO5A LOCAL PUNTO6A LOCAL PUNTO7A LOCAL PUNTO8ALOCAL PUNTO5B LOCAL PUNTO6BLOCAL RIFLOGO LOCAL RIFINTESTAZIONE LOCAL RIFFILENAMELOCAL IDPARTELOCAL INTESTAZIONELOCAL DATALOCAL PUNTOINSERIMENTOLET SOMMA 0LET PUNTO5B 0LET IDLISTA ("") LET POSLISTA ("")Checks if data are filled in (DS is an abbreviation macro for "DISPLAY") and, in case, asks forLET CTLCOMPLETEZZA 0{***** VERIFICA INSERIMENTO DATI E STABILISCE RIFERIMENTI FORM SECONDO IL FORMATO SCELTO *****}INQ_TOOLBAR_ITEM 'com_lists'IF ((INQ 15) = 0) DS ('Seleziona una lista')ELSE LET IDLISTA (NUMEROCOMMESS
Hy,here follows some code.Well, it's quickly written and without confrontation with other people, therefore it is surely amendable... But it works fine and that's the target!This is the macro which manages the creation of the toolbar, variables and messages are italian imprinted, since I was not thinking of possible publication. Bold text are comments.DEFINE TBSCHEMINILOCAL CTLERRORELOCAL CONTATORE1 LOCAL LISTELOCAL SLASHPOSLOCAL VERCOMMESSA{***** CREAZIONE TOOLBAR *****}The change from one job working directory to another is managed by a macro that also provides the restarting of the toolbar, destroying it if already created, to reflect the content of the new pathTRAP_ERRORTOOLBAR_ITEM 'txt_form' DESTROY CONFIRMTOOLBAR_ITEM 'rab_form' DESTROY CONFIRMTOOLBAR_ITEM 'txt_orientation' DESTROY CONFIRMTOOLBAR_ITEM 'rab_orientation' DESTROY CONFIRMTOOLBAR_ITEM 'txt_list' DESTROY CONFIRMTOOLBAR_ITEM 'com_lists' DESTROY CONFIRMTOOLBAR_ITEM 'txt_pos' DESTROY CONFIRMTOOLBAR_ITEM 'com_pos' DESTROY
Let's make a summary.I need to automatically draw standard forms linked to individual positions in a specified Bill Of Materials.The automatism allows easy traceability of form features (dimensions, position), headings filling in, assignment of file name.The variables involved are not so many: the choice is between A4 and A3 format, portrait or landscape orientation; linked Bill Of Materials and reference position(s).I decided upon a non-permanent toolbar: its creation is managed directly by the macro and this is its appearance:The toolbar caption reflects the current directory (Job number);available BOM (xls format) are read and loaded into the combo_list item.The "Positions" combo_edit item is freely editable.With the current selection, the OK button produces the sketch belowThe fundamental elements in it are the blue frame and the yellow text at the right bottom corner.The first is made recognizable by making it a POLYELEMENT; the text has been given the info 'FILENAME'.When the but
Hy everyone who may happen to read these lines,I was posting details of this activity as an idea, but I decided that, since I already realized it, I had to choose some other way for publishing it for whoever could be interested. So here's my first blog post.Our widely self tailored PDM system requires our department to produce sketches of parts to be machined by our suppliers.These sketches are usually grouped into a single .mi file. Upon creation, or at any revision stage, involved sketches must be saved into .pdf format whit a specified name architecture and path.Up till now, it meant (we are talking about 10 to 20 sketches at a time multiplied by 1 to n projects each job) the draftman had to launch a number of printing sessions, manually indicating from time to time print areas and file names.The idea is a tool capable of laying down standard formats drawn in a way that makes them recognizable to the software, give them the information needed to store them correctly, allow an easy m
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.