Aller au contenu

x13

Membres
  • Compteur de contenus

    96
  • Inscription

  • Dernière visite

Tout ce qui a été posté par x13

  1. INSTALLION AUTOMATIQUE D'UN MENU (Traduction de Elise Moss de www.mossdesigns.com) 1) Téléchargez "INNO SETUP" @ WWW.jrsoftware.org , c'est un installateur gratuit similaire à "INSTALLSHIED". 2) Téléchargez "ACAD INSTALL" de WWW.cadwerx.net, un autre outil gratuit. 3) Liste des fichiers requis: A) Fichier VLX B) Fichier MNU (compilé si désiré) C) ACADINST.EXE D) Licence.txt (Optionnel, mais peut aider l'usager lors de l'installation) E) Info.txt F) Fichier d'aide (Optionnel) 4) Pour débuter: A) Compléter votre fichier visual lisp. B) Compléter votre menu. C) Vérifier le bon fonctionnement de votre menu. 5) Le fichier LICENCE.TXT (Créé avec NOTEPAD et sauvegardé sous LICENCE.TXT). Exemple d'un fichier licence.txt : Ce programme est fourni par E.S.T.B. enr. @ la communauté des utilisateurs de D.A.O.. E.S.T.B. n'assume aucune responsabilité directe ou implicite pour tout dommage causé à d'autres programmes, ou bris de matériel informatique, ou perte et/ou détérioration de données, ou disfonctionnement, suite à l'utilisation de cette application. 6) Le fichier INFO.TXT (Créé avec Notepad et sauvegardé sous INFO.TXT). ATTENTION! S.V.P. fermer toutes les applications en cours d'utilisation, spécialement les logiciels AUTODESK avant de procéder à cette installation. Si vous conserver des programmes ouverts durant l'installation de ce menu, ce dernier pourrait ne pas s'installer ou présenter des disfonctionnements. 7) Le fichier AutoCAD INST.INI Vous obtenez un fichier AutoCAD INST.INI vide avec AutoCAD INSTALLER. Maintenant, vous devez compléter les cases vides. Sous VERSION: -Inscrivez la version d'AutoCad que vous utilisé. -Précisez ADD PATH = 7 Celà ajoute le chemin de recherche où l'utilisateur range ses fichiers VLX et MNU dans Autocad. Sous PRODUIT: -Indiquer le nom de votre produit. -Spécifiez le chemin de recherche par défaut de l'installation. 8) ARX Cette section est requise si vous voulez utiliser "Demand Loading" Menu: Menugroups = Menugroup: Menufile :Pop:Position (Sans extension) Utiliser un nombre supérieur à 12 pour localiser votre menu à la suite des menus standards. 9)EXEMPLE: Menugroups = Mymainmenu:mymenufile:1:3,myothermenu:mymenufile Réglera Mymainmenu et Myothermenu de mymenufile à être chargé lorsqu'AutoCad démarre. Le menu P0P1 de Mymainmenu sera placé en troisième au menu AutoCad et Myothermenu ne sera pas placé dans on P0P menu. MENU: -Toolbars = Une paire de parenthèses délimitant le menugroup.toolbar sera ajouté à AutoCad Gui. Si l'utilisateur prévoit fermer une des barres d'outils, cela l'obligera à le faire après l'installation du programme. 10) STARTUP Ajouter votre fichier VLX au STARTUP SUITE pour vous assurer qu'il sera disponible à l'usager. PROFILS: [ general] Détermine les valeurs sous HKEY_Current_user\software\autodesk\autocad [version\[product]\profiles\[profile]\general Si vous voulez que le menu, barre d'outils, startup, etc. s'applique à un profil utilisateur spécifique, substituez le nom du profil désiré à "GENERAL". 11) Le fichier INI est réalisé. Ce fichier doit être sauvegardé dans le répertoire de votre projet. - Assurez-vous que les noms de vos fichiers correspondent. - Vérifiez que vous avez bien réglé ADDPATH = T 12) Maintenant utilisons "INNO SETUP" A) Créer un nouveau script avec le "script wizard" B) Appuyer sur le bouton "OK" C) Appuyer sur le bouton "SUIVANT" D) Complétez les informations demandées aux cases et cliquez sur "SUIVANT" Le fichier exécutable est toujours AutoCAD INST.EXE. Ce fichier lit AutoCAD INST.INI et utilise les variables pour configurer votre application. 13) - Complétez le nom de votre application. - Désactivez toutes les autres applications. - Appuyez sur "SUIVANT" - Spécifiez votre fichier texte à utiliser et appuyez sur "SUIVANT" 14) - Maintenant Compilé le script. 15 Exemple de SCRIPT avec désinstallateur - Installation avec possibilité de désinstaller. [files] Sources: C:\somme path\acadinst.exe;destdir:{app} [Run] Filename: {app}acadinst.exe;parameters:{app};flags:waituntilidle [uninstallrun] Filename:{app}acadinst.exe;parameters:-u 16) Exemple de SCRIPT sans désinstallateur - Installation sans possibilité de désinstaller. [files] Sources: C:\somme path\acadinst.exe;destdir:{app} [Run] Filename: {app}acadinst.exe;parameters:{app};flags:waituntilidle 17) Sauvegardez tous vos réglages et testez votre installation. C'EST TOUT.
  2. Tu trouveras également un tutoriel en anglais à l'adresse suivante: http://www.afralisp.co.za/lisp/install1.htm http://www.afralisp.co.za/lispa/menuload.htm [Edité le 17/2/2006 par x13]
  3. Merçi de vos réponses. Cela allume ma chandelle. Salutations, François.
  4. Quel est l'usage du . "point" devant le nom d'une commande dans un lisp. Exemple 1: (command "_.arc" p1 p2 p3) Exemple 2: (command ".undo" "begin") François.
  5. x13

    Profil utilisateur

    Merçi Christian François.
  6. x13

    Gabarit insertion

    Bonjour Patrick_35, Merçi pour le code complémentaire. Après un premier regard voiçci quelques questions: 1) À la list4 tu liste les fichier ISO A0, A1,A2,A3,A4 Comme le nom de dessin demes gabarits porteront le préfixe A, S ou M, soit AA0, SA0 ,MAO et ainsi de suite. Est-ce ces lignes de code qui permettent le transfert d'une spécialité à l'autre. (setq nom_dwg (strcat "A" (nth (atoi rlst_2) lst_4))) (setq nom_dwg (strcat "S" (nth (atoi rlst_2) lst_4))) (setq nom_dwg (strcat "M" (nth (atoi rlst_2) lst_4)) 2) Si je ne me trompe pas , tu insère les gabarits dans l'espace objet, j'insère toujours mes gabarits dans les onglets de l'espace papier, je vais étudier le code pour permettre l'insertion dans les 2 modes. 3) Quelles est la façon la plus adéquate de vérifier les parenthèses. Les compter ces fastidieux dans certain cas. Surement Visual Lisp, je vais voir l'aide, en espérant que la procédure est bien décrite. Je vais test le tout ce soir . Merçi. François.
  7. x13

    Gabarit insertion

    Bonjour Cadarome, Pour ce qui est .DWT je connais, merçi quand même. Pour moi template est le terme anglais de gabarit qui peut contenir un bloc titre ou cartouche ou "title block" avec attributs. Bonjour Patrick_35 Il me semble y avoir 4 parenthèse de fermeture de trop que j'ai enlever et cela me semble fonctionné parfaitement pour ce qui est de l'ouverture de la boîte de dialogue et du choix de gabarit. Il reste à ajouter l'insertion des fihiers .DWG des gabarits. si tu peux me donner un enlignement. Merçi encore, François. :)
  8. x13

    Gabarit insertion

    Merçi beaucoup Patrick_35 pour le nouveau lisp, je vais regarder cela de plus près ce soir. Demain pour les commentaires, aujourd'hui la journée est trop chargée. Salutations, François
  9. x13

    Gabarit insertion

    Ces gabarits "cartouche" sont des fichiers DWG avec attributs.
  10. Bonjour, J'essai de modifier un petit programme servant à l'insertion de gabarit. Dans le fichier .DCL j'ai ajouter des gabarits dans la première série de radio bouton, puis j'ai ajouté 3 series de radio bouton. pas de problème de ce coté. J'ai annulé le bouton radio "none" et ajouter un bouton "cancel" et le code associé au lisp. Maintenant j'ai un message d'erreur du type erreur: aucune fonction definition: DO-IT Avant la modification du bouton de fermeture, les 8 premiers gabarit s'inséraient très bien (FDA @ FDH) par contre les 15 autres ne fonctionnaient pas. Merçi de votre aide. Voiçi le programme en question; (defun setv (systvar newval) (setq x (read (strcat systvar "1"))) (set x (getvar systvar)) (setvar systvar newval) ) ; setv (defun setting () (setv "CMDECHO" 0) (setv "BLIPMODE" 0) ) ; end of setting (defun rsetv (systvar) (setq x (read (strcat systvar "1"))) (setvar systvar (eval x)) ) ; restv (defun resetting () (rsetv "CMDECHO") (rsetv "BLIPMODE") ) ; end of resetting (defun coversheet () (setq dcl_id (load_dialog "coversheet.dcl")) (if (not (new_dialog "cover1" dcl_id)) (exit) ) ;_ end of if (action_tile "coversheet" "(set-cs $value)") (action_tile "cancel" "(done_dialog) (setq userclick nil)" ) ;_ end of action_tile (action_tile "accept" "(done_dialog)") (start_dialog) (unload_dialog dcl_id) ;;; (do-it) ) ;_ coversheet (defun set-cs (val) (setq csheet (cond ((= val "FDA") "FA8.5X11") ((= val "FDB") "FB11X17") ((= val "FDC") "FC18X24") ((= val "FDD") "FD24X36") ((= val "FDE") "FE36X48") ((= val "FDF") "FF8.5X14") ((= val "FDG") "FG8.5X11addenda") ((= val "FDH") "FH8.5X11Directive") ((= val "FDAA0") "FAA0") ((= val "FDAA1") "FAA1") ((= val "FDAA2") "FAA2") ((= val "FDAA3") "FAA3") ((= val "FDAA4") "FAA4") ((= val "FSA0") "FSA0") ((= val "FSA1") "FSA1") ((= val "FSA2") "FSA2") ((= val "FSA3") "FSA3") ((= val "FSA4") "FSA4") ((= val "FMA0") "FMA0") ((= val "FMA1") "FMA1") ((= val "FMA2") "FMA2") ((= val "FMA3") "FMA3") ((= val "FMA4") "FMA4") ;;;((= val "none") "none") ) ;_ cond ) ;_ setq ) ;_ defun ;;;(defun do-it () ;;; (setting) ;;;(if (/= csheet "none") (progn (command "_INSERT" csheet "0,0" "" "" "") ; international command (command "ZOOM" "_E") ; international command ) ;_ progn ; ) ;_ if (resetting) (princ) ) ;_ defun ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //12345678901234567890123456789012345678901234567890 // COVERSHEET.DCL Generalized drawing coversheets. cover1 : dialog { // Coversheet choices label = "Gabarits - Feuille de dessin - (Dimensions en MM)"; : boxed_radio_column { label = "Sélectionnez un gabarit -- STANDARDS IMPÉRIAL--"; key = "coversheet"; : radio_button { label = "Format A- (8.5po. x 11po. ou 9 x 12)"; key = "FDA"; } : radio_button { label = "Format B- (11po. X 17po. ou 12 x 18) DESSIN D'ATELIER STRUCT. ACIER"; key = "FDB"; } : radio_button { label = "Format C- 457 x 610 (18po. X 24po.)"; key = "FDC"; } : radio_button { label = "Format D- 610 x 914 (24po. X 36po.)"; key = "FDD"; } : radio_button { label = "Format E- 914 x 1219 (36po. X 48po.)"; key = "FDE"; } : radio_button { label = "Format F- 216 x 356 (8.5po. X 14po.) DESSIN D'ATELIER STRUCT. ACIER"; key = "FDF"; } : radio_button { label = "Format G- 216 x 279 (8.5po. X 11po.) ADDENDA"; key = "FDG"; } : radio_button { label = "Format H- 216 x 279 (8.5po. X 11po.) CHANTIER- AVIS CHANGEMENT-MODIFICATION"; key = "FDH"; } } // boxed radio column : boxed_radio_column { label = "Sélectionnez un gabarit -- STANDARDS ISO--"; :row { : boxed_radio_column { label = "ARCHITECTURE :"; : radio_button { label = "A0 - 1189 x 841"; key = "AA0"; } : radio_button { label = "A1 - 841 x 594"; key = "AA1"; } : radio_button { label = "A2 - 594 x 420"; key = "AA2"; } : radio_button { label = "A3 - 420 x 297"; key = "AA3"; } : radio_button { label = "A4 - 297 x 210"; key = "AA4"; } } :column { : boxed_radio_column { label = "STRUCTURE :"; : radio_button { label = "A0 - 1189 x 841"; key = "SA0"; } : radio_button { label = "A1 - 841 x 594"; key = "SA1"; } : radio_button { label = "A2 - 594 x 420"; key = "SA2"; } : radio_button { label = "A3 - 420 x 297"; key = "SA3"; } : radio_button { label = "A4 - 297 x 210"; key = "SA4"; } } } :column { : boxed_radio_column { label = "MÉCANIQUE-ÉlLECTRICITÉ :"; : radio_button { label = "A0 - 1189 x 841"; key = "MA0"; } : radio_button { label = "A1 - 841 x 594"; key = "MA1"; } : radio_button { label = "A2 - 594 x 420"; key = "MA2"; } : radio_button { label = "A3 - 420 x 297"; key = "MA3"; } : radio_button { label = "A4 - 297 x 210"; key = "MA4"; } } }}} : row { ok_cancel; } : paragraph { : row { : text_part { label = "Conçu et créer par:"; } : text_part { label = "Tony Hotchkiss"; } } : row { : text_part { label = "Adaptation et Traduction"; } : text_part { label = "François Huot, Montmagny, QC."; } } } } // cover1
  11. x13

    Profil utilisateur

    Peut-on importer un profil utilisateur d'une version à une autre. Exemple Autocad 2000 vers 2004. J'ai testé et j'ai du réinstaller la 2004, y a t-il une autre façon de faire que de passer par les outils Express. Salut, François.
  12. x13

    TEXTE VS BLOC

    Les attributs sont intégrés au gabarit, mais voilà après en avoir fait un bloc puis un wbloc j'essais d'insérer le gabarit sur mon onglet papier il me répond "bloc FAA1 réfère à lui-même. Qu'est-ce que cela signifie et ou est l'erreur. Merçci à vous deux pour l'aide. François. [Edité le 17/1/2006 par x13]
  13. x13

    TEXTE VS BLOC

    Merçi Winfield, C'était pour un gabarit avec bloc titre, donc je vais décomposé et refaire le bloc + wbloc.
  14. x13

    TEXTE VS BLOC

    Peut-on modifier du texte à l'intérieur d'un bloc ou d'un wbloc sans le décomposé "explode" si oui quel est la procédure ou commande. Merçi François
  15. x13

    Conversion d\'unités

    vous trouverez un convertisseur d'unités gratuit sur ce site http://www.esbconsult.com.au/ , il ne vous restera qu"a créer un bouton et/ou l'intégré a votre menu de la façon suivante :[Convertisseur d'unités](Startapp "G:/Esbpcs/utils/ESBUnitConv.exe") Bien déterminer le chemin de recherche en fonction de votre répertoire d'installation. :cool:
  16. Oui, il est possible de modifier un fichier .DCL en autant que le fichier .LSp associé soit accessible pour activer (programmer) tes nouveaux boutons. :cool:
  17. Voiçi quelques sites à consulter: http://www.afralisp.co.za/index.htm http://www.gr-acad.arq.br/paginas/dup.htm http://www.autolisppage.com/ALcourse.html http://klobouk.fsv.cvut.cz/~chour/Cviceni/Menu.zip http://klobouk.fsv.cvut.cz/~chour/Lisp/Chapter%207.htm http://www.draftsperson.net/autocad/tutorials/9904_AutoCADLispLesson.htm http://www.gregmacg.com/Autotut1.html http://come.to/autolisppage :)
  18. x13

    [lisp] et [pdf]

    ;;; Exemples de commandes externes pour Windows ;;; Explorer=Windows explorer,Excel=Microsoft Excel,Winword=Microsoft Winword,http:\\www.=adresse web ;;; Voir aussi la fonction AUTOLISP (startapp) pour une méthode alternative. ;;; Permet d'appeler d'autres programmes, utilitaires DOS ou WINDOWS au travers AutoCad ;;; (sans sortir d'AutoCad) EXPLORER, START EXPLORER, 1,, WRITE, START WRITE, 1,, ACAD, START AutoCAD, 1,, EXCEL, START EXCEL, 1,, BD, START EXPLORER r:\acad\misc\library\,1 NOTEPAD, START NOTEPAD, 1,*Fichier à éditer:, TDA, START WINWORD c:\mydocs\tcards3.doc,1 TCD, START EXCEL c:\mydocs\tcards3.xls,1 PBRUSH, START PBRUSH, 1,, TC, http://taylor3/intranet/lisp/Taacad.html,0 helpme,start myhelp.chm, 1,, GRPHELP, STARTAPP"hh" "J:\\ESTB\\Grplayer.chm" ;;;Dans un menu [Convertisseur d'unités] (Startapp "G:/Esbpcs/utils/ESBUnitConv.exe") ;;;Dans une macro activant un bouton ^C^C^P(startapp "explorer" (strcat "/e," (getvar "dwgprefix"))) ;;; Dans une routine LISP (defun C:DIRR ()(COMMAND ".BROWSER" (GETVAR "DWGPREFIX"))) ;;; (command "start" (findfile "Myfile.pdf))
  19. x13

    [lisp] et [pdf]

    Voiçi une partie du lisp de mon fichier d'aide de mon menu personnalisé (defun OU () (if (not (setq OUT (findfile "menu_express_eric_guelen.pdf") ) ;_ end of setq ) ;_ end of not (alert "Désolé - Fichier Outils Express manquant") (progn (startapp "C:/Program Files/Adobe/Acrobat 5.0/Reader/AcroRd32.exe" OUT) (c:estbaide) ) ) ;_ end of if (princ) ) ;_ end of defun Fonctionne très bien sur Autocad 2000 et win 98 ;)
  20. x13

    afralisp

    L'ancien site était fermé depuis plus d'un mois. Bonne nouvelle, Kenny Ramage a un nouveau site depuis cette semaine à l'adresse suivante http://www.afralisp.co.za/index.htm
  21. Voiçi un début, AUTOCAD Commandes Françaises Commandes Anglaises Raccourcis ? ? ? 3D 3D 3DARRAY 3DARRAY 3A 3DDELIM 3DCLIP 3DDIST 3DDISTANCE 3DFACE 3DFACE 3F 3DMAILLE 3DMESH 3DORBITE 3DORBIT 3DO 3DORBITEC 3DCORBIT 3DPAN 3DPAN 3DPIVOT 3DSWIVEL 3DPOLY 3DPOLY 3DZOOM 3DZOOM ACADBLOCKDIALOG ACADBLOCKDIALOG ACADWBLOCKDIALOG ACADWBLOCKDIALOG (-) ACCROBJ (-) OSNAP OS ADCENTER ADCENTER ADC,CTRL+2 AFFCLICH VSLIDE AFFICHURLS SHOWURLS AFFIMG REPLAY AFFMAT SHOWMAT AI_BOX AI_BOX AI_CIRCTAN AI_CIRCTAN AI_CONE AI_CONE AI_DISH AI_DISH AI_DOME AI_DOME AI_MESH AI_MESH AI_PSPACE AI_PSPACE AI_PYRAMID AI_PYRAMID AI_SPHERE AI_SPHERE AI_TORUS AI_TORUS AI_WEDGE AI_WEDGE AIDE HELP AIDIMSTYLE AIDIMSTYLE AIRE AREA AA AJOUR UPDATE (-) AJUSTEIMAGE (-) IMAGEADJUST IAD AJUSTER TRIM TR AJUSTERB BTRIM AJUSTEXTE TEXTFIT Commandes Françaises Commandes Anglaises Raccourcis ? ALI ALIGNED AL ALIGN ALIGN AL AMECONV AMECONVERT ANG ANGULAR ANNEAU DONUT / DOUGHNUT DO ANNULER UNDO CTRL+Z APERCU PREVIEW PRE APPLOAD APPLOAD AP APPTEXTDIST RTEXTAPP APROPOS ABOUT ARC ARC A ARRIEREPLAN BACKGROUND ARX ARX ASEADMIN ASEADMIN ASEEXPORT ASEEXPORT ASELINKS ASELINKS ASEROWS ASEROWS ASESELECT ASESELECT ASESQLED ASESQLED ASSISTIMPC PCINWIZARD ASSISTPRESENT LAYOUTWIZARD ASSJEULREPRAP QLATTACHSET ASSLREPERERAP QLATTACH ASSPLUMESR14 R14PENWIZARD ATTACHEIMAGE IMAGEATTACH IAT ATTACHER CLIP ATTACHURL ATTACHURL (-) ATTDEF (-) ATTDEF -ATT,ATT ATTECRAN ATTDISP (-) ATTEDIT (-) ATTEDIT -ATE,ATTE,DDATTE ATTEXTR ATTEXT DDATTEXT ATTREDEF ATTREDEF ATTRGLOB GATTE (-) BAROUTIL (-) TOOLBAR TO BASE BASE BCADRES TFRAMES BIBLMAT MATLIB BIBLPAYS LSLIB BISEAU WEDGE (-) BLOC (-) BLOCK -B, B, BMAKE BMAKE BOÎTE BOX BROUILLARD FOG Commandes Françaises Commandes Anglaises Raccourcis ? CACHE HIDE HI CADREIMAGE IMAGEFRAME CAL CAL (-) CALQUE (-) LAYER LA CALQUEAC LAYON CALQUECOUR LAYCUR CALQUEINAC LAYOFF CAMERA CAMERA CEN CENTER CERCLE CIRCLE C CFGBOUTIL TBCONFIG CHANFREIN CHAMFER CHA CHANGER CHANGE -CH CHANGERCALQUE LAYMCH CHARG3DS 3DSIN CHARGACIS ACISIN CHARGDXB DXBIN CHARGDXF DXFIN CHARGER LOAD CHARGMNU MENULOAD (-) CHARGPARTIEL (-) PARTIALOAD CHARGPS PSIN CHARGVBA VBALOAD CHARGWMF WMFIN CHEVAUCHIMAGE IMAGEOVERLAP CHOISIRURL SELECTURL CHPROP CHPROP CLOREREF REFCLOSE COLLAGSPEC PASTESPEC PA COLLERBLOC PASTEBLOCK COLLERHYPERLIEN PASTEASHYPERLINK COLLERORIG PASTEORIG COLLERPRESS PASTECLIP CTRL+V COMPILER COMPILE COMPTEBL BCOUNT CONE CONE CONFIG CONFIG CONNECTBD DBCONNECT DBC,CTRL+6 CONT CONTINUE (-) CONTOUR (-) BOUNDARY / BPOLY -BO,BO, BPOLY CONTROLE AUDIT CONVERSTYLEST CONVERTPSTYLES CONVERT CONVERT Commandes Françaises Commandes Anglaises Raccourcis ? CONVERTCTB CONVERTCTB CONVVL VLCONV COPIER COPY CO,CP COPIERBASE COPYBASE COPIERHIST COPYHIST COPIERIMBR NCOPY COPIERINCORP COPYEMBED COPIERLIEN COPYLINK COPIERPRESS COPYCLIP CTRL+C COPIERPROP PAINTER CORRESPROP MATCHPROP MA COT DIM COT1 DIM1 COTALI DIMALIGNED DAL,AL COTANG DIMANGULAR DAN,AN COTCEN DIMCENTER DCE,CE COTCONT DIMCONTINUE DCO,CO COTDIA DIMDIAMETER DDI,D COTEDIT DIMEDIT DDE COTETAT DIMSTATUS COTEX DIMEX COTHOR DIMHORIZONTAL HOR COTINITXT DIMHOMETEXT HOM COTLIGN DIMBASELINE DBA,B COTLIN DIMLINEAR DLI COTOBLIQUE DIMOBLIQUE OB COTORD DIMORDINATE DOR,OR COTRAP QDIM COTRAYON DIMRADIUS RA COTREDEF DIMOVERRIDE OV COTREDESS DIMREDRAW RE COTREP DIMLEADER L COTROTATION DIMROTATED RO COTSAUVE DIMSAVE (-) COTSTYLE (-) DIMSTYLE Style,DDS COTTEDIT DIMTEDIT COTTROTATION DIMTROTATE COTTXTNOUV DIMNEWTEXT N COTVERTICAL DIMVERTICAL VE (-) COULEUR (-) COLOR / COLOUR CL COUPE SECTION COUPERPRESS CUTCLIP COUPURE BREAK BR Commandes Françaises Commandes Anglaises Raccourcis ? CRFORME MKSHAPE CRTLIGNE MKLTYPE CYLINDRE CYLINDER DATE DATE DBCCONFIGURE DBCCONFIGURE DBCCONNECT DBCCONNECT DBCDEFINELLT DBCDEFINELLT DBCDEFINELT DBCDEFINELT DBCDELETELINKS DBCDELETELINKS DBCDELETELLT DBCDELETELLT DBCDELETELT DBCDELETELT DBCDELETEQRY DBCDELETEQRY DBCEDITLINKEDTABLE DBCEDITLINKEDTABLE DBCEDITLLT DBCEDITLLT DBCEDITLT DBEDITLT DBCEDITQRY DBCEDITQRY DBCEDITTABLE DBCEDITTABLE DBCEXECUTEQRY DBCEXECUTEQRY DBCEXPORTLINKS DBCEXPORTLINKS DBCEXPORTQS DBCEXPORTQS DBCEXPORTTS DBCEXPORTTS DBCHIDELABELS DBCHIDELABELS DBCIMPORTQRY DBCIMPORTQRY DBCIMPORTQS DBCIMPORTQS DBCIMPORTTS DBCIMPORTTS DBCLINKCONVERSION DBCLINKCONVERSION DBCLINKMANAGER DBCLINKMANAGER DBCRELOADLABELS DBCRELOADLABELS DBCSELECTLINKS DBCSELECTLINKS DBCSHOWLABELS DBCSHOWLABELS DBCVIEWLINKEDTABLE DBCVIEWLINKEDTABLE DBCVIEWTABLE DBCVIEWTABLE DDAMODES DDRMODES DDATTDEF DDATTDEF DDATTE DDATTE DDA DDATTEXT DDATTEXT DDBLOCK DDBLOCK DDCHPROP DDCHPROP DDCOLOR DDCOLOR DDEDIT DDEDIT ED,DDE DDGRIPS DDGRIPS DDIM DDIM DDINSERT DDINSERT DDI Commandes Françaises Commandes Anglaises Raccourcis ? DDMODIFY DDMODIFY DDM DDOSNAP DDOSNAP DDPTYPE DDPTYPE DDRENAME DDRENAME DDSCU DDUCS DDSELECT DDSELECT DDTYPE DDTYPE DDUCSP DDUCSP DDUNITS DDUNITS DDVIEW DDVIEW DDVPOINT DDVPOINT DDWBLOCK DDWBLOCK DECALER OFFSET O DECHARGDIDACT TUTCLEAR DECHARGMNU MENUUNLOAD DECHARGVBA VBAUNLOAD DECOMP BURST DECOMPOS EXPLODE X DELAI DELAY DELIM CLIPIT DELIMIMAGE IMAGECLIP ICL DEMIDROITE RAY DEMODIDACT TUTDEMO DEPCOPROT MOCORO DEPLACER MOVE M DETACHURL DETACHURL DEVERCALQUE LAYULK DIA DIAMETER DISSJEULREPRAP QLDETACHSET DISTANCE DIST DI DIVISER DIVIDE DIV DROITE XLINE XL DROPGEOM DROPGEOM ECHELLE SCALE SC ECHELLEOLE OLESCALE ECHLTP LTSCALE LTS ECRANGRA GRAPHSCR ECRANTXT TEXTSCR EDGE EDGE EDITEXTMULT MTEDIT (-) EDITHACH (-) HATCHEDIT HE (-) EDITREF (-) REFEDIT EDITSOLIDE SOLIDEDIT Commandes Françaises Commandes Anglaises Raccourcis ? EDITSPLINE SPLINEDIT SPE EFFACER ERASE E ELEV ELEV ELLIPSE ELLIPSE EL EMPIECE EXTRIM ENREGREF REFSAVE (-) EPAISSLIGNE (-) LWEIGHT LW ESPACEO MSPACE MS ESPACEP PSPACE PS ETAT STATUS ETENDENTIT BEXTEND ETIRER STRETCH ETIRERSM MSTRETCH EVOLDYN DRAGMODE EXC EXC (-) EXECVBA (-) VBARUN EXF EXW EXP EXP EXPC EXCP EXPF EXWP EXPLCONT CONTENT EXPORTER EXPORT EXP EXT EXF EXTRUSION EXTRUDE EXT FCALQUE VPLAYER FCONFIG VPCONFIG FDELIM VPCLIP (-) FENETRES VIEWPORTS /(-) VPORTS FENSYST SYSWINDOWS FERMER CLOSE FERMERPROP PROPERTIESCLOSE FERMERTOUT CLOSEALL (-) FHACH (-) BHATCH FICHJOURNAC LOGFILEON FICHJOURNIN LOGFILEOFF FILTER FILTER FI FMODE VPMODE FMULT MVIEW FORMES SHAPE FUSCALQUE LAYMRG GELCALQUE LAYFRZ GESTCALQUE LMAN GESTSCU (+) UCSMAN Commandes Françaises Commandes Anglaises Raccourcis ? GESTSTYLE STYLESMANAGER GESTTRACEUR PLOTTERMANAGER GESTVBA VBAMAN GIFIN GIFIN GRAPHETAT TREESTAT GRILLE GRID (-) GROUPE (-) GROUP -G, G HACHURES HATCH -H HOR HORIZONTAL (-) HYPERLIEN (-) HYPERLINK HYPERLIENARRET HYPERLINKSTOP HYPERLIENKPREC HYPERLINKBACK HYPERLIENSUIV HYPERLINKFWD ICONBLOC BLOCKICON ICONESCU UCSICON ID ID (-) IMAGE (-) IMAGE -IM, IM IMPCOTE DIMIM IMPORTER IMPORT IMP INETCFG INETCFG INITXT HOMETEXT (-) INSERER (-) INSERT -I INSERM MINSERT INSEROBJ INSERTOBJ IO INSERURL INSERTURL INTERFERENCE INTERFERE INF INTERSECT INTERSECT IN ISOCALQUE LAYISO ISOMETR ISOPLANE JEUREF REFSET JOINPL PLJOIN LIBCALQUE LAYTHW LIENSOLE OLELINKS LIGN BASELINE LIGNE LIGNE L LIMITES LIMITS LISTE LIST IL, LS LISTEBD DBLIST LITMAT RMAT LITMAT FINISH LREPERE LEADER LREPERERAP QLEADER LSP LSP Commandes Françaises Commandes Anglaises Raccourcis ? LUMIERE LIGHT MAINLEV SKETCH MAINTIEN HANDLES MAJRENDU RENDERUPDATE MAPPING SETUV MARQUES BLIPMODE MASQMODIF DBCCLOSE MASQUETEXTE TEXTMASK MCLICHE MSLIDE MENU MENU MENUEXPRESS EXPRESSMENU MESURER MEASURE MIROIR MIRROR MR MIRROR3D MIRROR3D MISENPAGE PAGESETUP MISENPAGEDANS PSETUPIN (-) MLEDIT (-) MLEDIT MLIGNE MLINE MLSTYLE MLSTYLE MODBLOC BMOD MODEGESTCAL LMANMODE MODEJOINPL PLJOINMODE MODEREDIR REDIRMODE MODIFIER MODIFY MODIFLONG LENGTHEN MODIFVAR SETVAR MODPAYS LSEDIT MOTIFPS PSFILL MPEDIT MPEDIT MULTIPLE MULTIPLE MVSETUP MVSETUP NAVIGATEUR BROWSER NAVIGUERADC ADCNAVIGATE NETTOYER WIPEOUT NONDEF UNDEFINE NOUVBA VBANEW NOUVCOTE NEWDDIM NOUVEAU NEW NUAGEREV REVCLOUD NVPAYS LSNEW OBJET MODEL OBLIQUE OBLIQUE OBTENIRSEL GETSEL Commandes Françaises Commandes Anglaises Raccourcis ? OMBRARETE SHADEDGE OPTIONS OPTIONS OPTIONSHYPERLIEN HYPERLINKOPTIONS OPTIONSPLEINECRAN FULLSCREENOPTIONS OPTIONWMF WMFOPTS ORD ORDINATE ORDRETRACE DRAWORDER ORTHO ORTHO ORTHOGRAPHE SPELL OUTILSEXPRESS EXPRESSTOOLS OUVERTUR APERTURE OUVREFICH FILEOPEN OUVRIR OPEN OUVRIRURL OPENURL (-) OUVRPARTIEL (-) PARTIALOPEN PACK PACK (-) PAN (-) PAN PANDYN RTPAN (+) PARAMDES (+) DSETTINGS PEDIT PEDIT PLEINECRAN FULLSCREEN PLEINECRANAC FULLSCREENON PLEINECRANINAC FULLSCREENOFF PMAILLE PFACE POINT POINT POINTVUE VPOINT POLYGONE POLYGON POL POLYLIGN PLINE PREFERENCES PREFERENCES (-) PRESENTATION (-) LAYOUT PROLONGE EXTEND PROLTRACEL EPLOTEXT PROPDESS DWGPROPS PROPMECA MASSPROP PROPRIETES PROPERTIES CH, MO, PROPS PROPTMULT MTPROP PSDYN PSDRAG PURGER PURGE PU QUALITEIMAGE IMAGEQUALITY QUITTER QUIT RACCORD FILLET F RAYON RADIUS RDECRAN RENDSCR Commandes Françaises Commandes Anglaises Raccourcis ? RDPREF RPREF RECHERCHER FIND RECTANG RECTANG RECTANGLE RECTANGLE RECUPERER RECOVER REDEF REDEFINE REDESS REDRAW REDESTOUT REDRAWALL REDIR REDIR REGEN REGEN REGION REGION REGNAUTO REGENAUTO REGNTOUT REGENALL REINIT REINIT REMPLIR FILL RENDU RENDER (-) RENOMMER (-) RENAME REPERAGE TRACKING REPERE PLAN REPRENDRE RESUME REPRISE OOPS RESEAU ARRAY RESOL SNAP RESTAURER RESTORE RESVUE VIEWRES RETABLIR REDO RETIRMASQUE TEXTUNMASK REVOLUTION REVOLVE RFILEOPT RFILEOPT ROT ROTATED ROTATE3D ROTATE3D ROTATION ROTATE RO RSCRIPT RSCRIPT SAUVE3DS 3DSOUT SAUVEACIS ACISOUT SAUVEBMP BMPOUT SAUVEDWF DWFOUT SAUVEDWFD DWFOUTD SAUVEDXF DXFOUT SAUVEGRD SAVE SAUVEIMG SAVEIMG SAUVENOM SAVEAS SAUVEPS PSOUT Commandes Françaises Commandes Anglaises Raccourcis ? SAUVERAP QSAVE SAUVESTL STLOUT SAUVEURL SAVEURL SAUVEWMF WMOUT SCENE SCENE SCRIPT SCRIPT SCU UCS SECTION SLICE SELECT SELECT SELECTRAP QSELECT SH SH SHADE SHADE SHELL SHELL SOLDRAW SOLDRAW SOLIDE SOLID SOLPROFIL SOLPROF SOLVIEW SOLVIEW SORTIE EXIT SOUSTRACTION SUBTRACT SPHERE SPHERE SPLINE SPLINE SSX SSX STATS STATS (-) STYLE (-) STYLE STYLETRACEUR PLOTSTYLE SUPCALQUE LAYDEL SUPERHACH SUPERHATCH SURFEXTR TABSURF SURFGAU EDGESURF SURFREGL RULESURF SURFREV REVSURF TABLETTE TABLET TDEDIT RTEDIT TEDIT TEDIT TEMPS TIME TEXTDIST RTEXT TEXTE TEXT T TEXTERAP QTEXT (-) TEXTMULT (-) MTEXT MT TOLERANCE TOLERANCE TORE TORUS TRACE TRACE (-) TRACEUR (-) PLOT Commandes Françaises Commandes Anglaises Raccourcis ? TRANSPARENCE TRANSPARENCY TROTATION TROTATE TXT2MTXT TXT2MTXT TXTA ATEXT TXTARC ARCTEXT TXTDYN DTEXT TXTEXP TXTEXP TXTNOUV NEWTEXT (-) TYPELIGNE (-) LINETYPE -LT, LT U U UNION UNION (-) UNITES (-) UNITS VARIABLES VARIABLES VBAIDE VBAIDE VBAINSTR VBASTMT VBAPREF VBAPREF VERROUCALQUE LAYLCK VERTICAL VERTICAL VLIDE VLIDE VUEAER DSVIEWER VUEDYN DVIEW (-) VUES (-) VIEW (-) WBLOC (-) WBLOCK (-) XAJOUTER (-) XBIND XATTACHER XATTACH XDATA XDATA XDELIM XCLIP XDLIST XDLIST XLIST XLIST XP XP XPLODE XPLODE (-) XREF (-) XREF ZOOM ZOOM ZOOMDYN RTZOOM Note 1: Il semble y avoir plus de commandes dans le tableau de gauche. Cette différence s'explique par la double nomenclature de certaines commandes anglaises. Note 2: Le signe (-) présents pour certaines commandes indiquent une variante pour les forcer à s'exécuter sur la ligne de commande plutôt qu'avec une boîte de dialogue (voir XREF). Le signe (+) quant à lui indique que vous pouvez choisir l'onglet de la boîte de dialogue qui s'ouvrira. Les onglets sont référé par des indices entiers commençant à zéro (voir DSETTINGS). Accelerator Keys F1 FROM F2 *Flip screen F3 Center object snap F4 Endpoint object snap F5 Intersection snap F6 Midpoint object snap F7 *Grid toggle F8 *Ortho toggle F9 *Snap toggle F10 *Tablet toggle F11 Nearest object snap F12 Perpendicular snap * Indicates AutoCAD for Windows default. Other AutoCAD Hot Keys Ctrl+A Group on/off Ctrl+B Snap to grid on/off Ctrl+C Copy to clipboard Ctrl+D Coords toggle Ctrl+E Isoplane toggle Ctrl+G Grid on/off Ctrl+L Ortho on/off Ctrl+N New drawing Ctrl+O Open drawing Ctrl+P Plot drawing Ctrl+R Change viewports Ctrl+S Qsave Ctrl+T Tablet on/off Ctrl+V Paste to clipboard Ctrl+X Cut to clipboard Ctrl+Z Undo
  22. http://www.markcad.com/autocad/drawingscale.htmCe site devrait t'apporter une partie de la réponse. Pour ce qui est du 3/4" = 1'-0 5/16", voiçi le calcul: 5/16" = .3125" soit 1/16x5 donc 12.3125" x 4 / 3 = 16.4167 qui est ton facteur XP C'est tout.
  23. X13 (Marseillais !!!) Mais non. Québeçois, oui :exclam:
  24. il y a peut-être une partie de la solution içi http://theswamp.org/phpBB2/viewtopic.php?t=6106&sid=dd6f43ad7c1c1ead87670c587fdd060d
  25. Voiçi 2 petits programmes LISP qui devraient résoudre ton problème. ;| REVCLOUD.LSP Copyright © 1997 by Autodesk, Inc. Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and the limited warranty and restricted rights notice below appear in all supporting documentation. AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE. Use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in FAR 52.227-19 (Commercial Computer Software - Restricted Rights) and DFAR 252.227-7013©(1)(ii) (Rights in Technical Data and Computer Software), as applicable. Last revision 10/02/97 Bob Abernethy, dba/CADesigner Credits: Original Code, idea and concept by David Harrington Bill Kramer, Q.C. Phil Kreiker, Q.C. Dominic Panholzer, Q.C. Randy Kinsley, Error Control Greg Robinson Bob Abernethy, dba/CADesigner, Added Incremental numbered revision callout triangle & Layer control |; (defun input_integer (a b / c) (setq a (strcat a " <"(rtos b 2 0)"> ")) (setq c (getint a)) (if (/= c NIL) (setq b c) (setq b b) ) ) (setq incr 1) (defun item (ent) (cdr(car(entget(ent)))) ) (defun ERR (s) (if (/= s "Function cancelled\n") (if (= s "quit / exit abort") (princ) (alert (strcat " >> Error << \n")) ) ) (setvar "CLAYER" CL) (setq *error* olderr) (princ) ) (Defun C:REVCLOUD (/ ARC_DIST ;;radius of included arc INC_ANGLE ;;included angle in degrees LAST_PT ;;the last point just entered/shown START_PT ;;where the cloud began NEXT_PT ;;where we are going next TMP ;;tempory holder for radius of bulge ) (setq olderr *error* *error* err) (setq ce (getvar "cmdecho")) (setq blp (getvar "blipmode")) (setq osm (getvar "osmode")) (setvar "cmdecho" 0) (setvar "blipmode" 0) (setvar "osmode" 0) (setq cl (getvar"clayer")) (if (not (tblsearch "LAYER" "rcloud")) (command "layer" "m" "rcloud" "c" "12" "rcloud" "") ) (command "layer" "s" "rcloud" "") ;;--------real program starts here! (Setq INC_ANGLE 110) (if (and (/= "" (getcfg "AppData/AC_Bonus/Revcld_Bulge")) (/= nil (getcfg "AppData/AC_Bonus/Revcld_Bulge")) ) (setq ARC_DIST (atof (getcfg "AppData/AC_Bonus/Revcld_Bulge"))) (if (= (getvar "DIMSCALE") 0) (setq ARC_DIST 0.375) (setq ARC_DIST (* 0.375 (getvar "DIMSCALE"))) ) );end if (prompt (strcat "\nArc length set at " (rtos ARC_DIST 2 3))) (setq plwid (getvar"plinewid")) (setvar "plinewid" (* (getvar"dimscale")0.0078)); use for wider than zero pline width ; (setvar"plinewid" 0.0); use for zero pline width (setq om (getvar"orthomode")) (setvar "orthomode" 0) (initget "Arc") (setq LAST_PT (GetPoint "\nArc longeur/: ")) (if (= LAST_PT "Arc") (progn (initget 6) (setq TMP (getdist (strcat "\nArc length <" (rtos ARC_DIST 2 3) ">: "))) (if TMP (Progn (setq ARC_DIST TMP) ;R14 method of saving variable values (setcfg "AppData/AC_Bonus/Revcld_Bulge" (rtos ARC_DIST)) ) ) (setq LAST_PT (getpoint "\nDéterminez point de départ du nuage: ")) ) ;;end STR "RADIUS" test ) (if LAST_PT (progn ;;start up the cloud generator... (setq START_PT LAST_PT SAVED_EN (entlast)) (Prompt "\nGuide crosshairs along cloud path...") (Command "_.pline" ;draw cloud as a polyline on current layer LAST_PT "_a" ;specify arc option "_a" ;specify angle option INC_ANGLE ;included angle ) )) ;end IF LAST_PT (While LAST_PT ;;as long as we have a last point value, (Setq NEXT_PT (GrRead 1) ;;real time read READTYP (car NEXT_PT) ) (if (or (= 5 READTYP) (= READTYP 3)) ;;read a position or a pick? (progn (setq NEXT_PT (cadr NEXT_PT)) (If (or (> (Distance LAST_PT NEXT_PT) ARC_DIST) (= READTYP 3)) (Progn (Command NEXT_PT "_a" INC_ANGLE) (Setq LAST_PT NEXT_PT) ) ) (If (> (Distance LAST_PT NEXT_PT) (Distance START_PT NEXT_PT) ) (Progn (Command START_PT "_cl") (Setq LAST_PT Nil) (prompt "\nNuage terminé.") ) ) ) (prompt "\nDéplacer le pointeur pour dessiner le nuage") );End if );End while (setvar "cmdecho" ce) (setvar "blipmode" blp) (setvar "osmode" osm) (setvar "orthomode" om) (setvar "plinewid" plwid) (clnu) (setq *error* olderr) (Princ) ) ;end cloud.lsp (defun clnu (/ num pt) (setq incr (input_integer "\nEntrer le numéro de révision: " incr)) (setq pt(getpoint"\nDéterminez l'emplacement du symbôle de révision sur le nuage: ")) (command"layer""s""rcloud""") (command "polygon" "3" pt "I" (/(getvar"dimscale")6.5)) (setvar"cecolor""1") (command "text" "m" pt (*(getvar"dimscale")(getvar"dimtxt")1.0) "0" (itoa incr)) (setq incr (+ incr 1)) (setvar"cecolor""bylayer") (command"layer""s"cl"") ) (Defun c:RCHELP (/) (prompt " The Revision Cloud program draws a user specified bulge pline\n") (prompt " along the path of the crosshairs. To close the cloud, \n") (prompt " simply return to the starting point\n") (prompt " The cloud arc length can be specified in the beginning, with keyboard input\n") (prompt " by specifying A for Arc, entering a length, or picking two pts.\n") (textscr) (princ) ) (Prompt " REVCLOUD chargé. Tapez REVCLOUD pour dessin le nuage de révision,\n") (prompt " pour fermer le nuage revenez au point de départ. pour de l'aide additionnelle - RCHELP") (Princ) Le deuxième: ;;; PL2Cloud.lsp by Charles Alan Butler ;;; Copyright 2004 ;;; by Precision Drafting & Design All Rights Reserved. ;;; Contact at ab2draft@TampaBay.rr.com ;;; ;;; Version 1.0 Beta May 1,2004 ;;; Version 1.1 Beta May 5,2004 ;;; Added options to size the arc ;;; Version 1.2 Beta May 19,2004 ;;; Added option for cloud style ;;; Version 1.3 Beta June 15,2004 ;;; Revised to use Dialog Box Interface ;;; Version 1.4 Beta June 23,2004 ;;; Dialog Box Revisions ;;; Version 1.5 Beta September 16,2004 ;;; Incorperated the Dialog File Creator Routine ;;; Disabled the Chord Length DimScale feature ;;; Version 2.0 October 22,2004 ;;; Support for arcs polylines and will also process a picked ;;; spline, circle or ellipse ;;; ;;; DESCRIPTION ;;; User picks or Draws a LW polyline and the routine draws a revision ;;; cloud along it, User option to delete the original polyline ;;; ;;; Files Required to be in the AutoCAD search path ;;; pl2cloud.dcl ;;; rc_normal.sld ;;; rc_shadow.sld ;;; rc_length.sld ;;; ;;; Limitations ;;; No error checking when object pline is too small ;;; ;;; ;;; Command Line Usage ;;; Command: PL2Cloud ;;; Dialog Box is displayed unless there is a problem ;;; Then the command line version is as follows ;;; Enter method to get polyline. [Détermine 2 points / Dessine / Options / Nuage] : ;;; Keep the original polyline [Yes No] :y ;;; Pick Polyline to cloud: ;;; ;;; Options: Command Line Version ;;; Pick - allows user to pick an existing poly line ;;; Draw - allows user to draw a new polyline ;;; Shadow - toggles the shadow effect on/off ;;; Options - Change Arc Angle, makes arcs fatter or thinner ;;; Change the chord length of the arcs ;;; Enter a new Chord length or negative number to divide into DimScale ;;; Enter the actual chord length desired or ;;; enter a negative number and that number will be divided into ;;; the current dimscale to derive the chord length ;;; ;;; This software is provided "as is" without express or implied ; ;;; warranty. All implied warranties of fitness for any particular ; ;;; purpose and of merchantability are hereby disclaimed. ; ;;; You are hereby granted permission to use, copy and modify this ; ;;; software without charge, provided you do so exclusively for ; ;;; your own use or for use by others in your organization in the ; ;;; performance of their normal duties, and provided further that ; ;;; the above copyright notice appears in all copies and both that ; ;;; copyright notice and the limited warranty and restricted rights ; ;;; notice appear in all supporting documentation. ; (prompt "Loading PL2Cloud....") (defun c:pl2cloud (/ dscale plw dist spcs usercmd useros *error* a270 a90 userbm oer oldplw ent entlst oldent method keeppl useds arcang chord cloud_style draw_style keeppl ) ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= (defun *error* (msg) (if (not (member msg '("console break" "Function cancelled" "quit / exit abort" "") ) ) (princ (strcat "\nError: " msg)) ) ; if (setvar "Plinewid" oldplw) (setvar "blipmode" userbm) ;reset blipmode (setvar "CMDECHO" usercmd) (setvar "osmode" useros) (setq pl2cloudglobal (put_saved_vars) userbm nil oldplw nil usercmd nil useros nil ) (princ) ) ;end error function ;;; ================================================================= ;;; Main Routine ;;; ================================================================= (setq usercmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq useros (getvar "osmode")) (setvar "osmode" 0) (setq userbm (getvar "blipmode")) (setvar "blipmode" 0) (setq oldplw (getvar "plinewid")) ;get old Plinewidth setting ;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; Arc size is determined by the following defaults ;; They remain set throught the session in one drawing ;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; arcang 140 arc angle, smaller = flatter arcs ; start with 140 ;; chord -2 Arc Chord Length > 0 use actual chord distance ;; else < 0 use dim scale / (abs chord) ;; example dimscale = 48 use -1 and chord will be 48 units ;; use -2 and chord will be 24 units ;; cloud_style "Normal" or "Shadow" Pre set cloud style (if (null pl2cloudglobal) ;; does not exist yet, make global so we can reuse in this drawing ;; these are the default values used the first time run in a session (setq pl2cloudglobal ; Set Default values (list 140 ; Model Space ArcAng 140 ; Paper Space ArcAng -2 ; Model Space Chord 20 ; Paper Space Chord "Pick" ; draw style Pick or Draw nil ; Keep poly line T or nil "Normal"); cloud style Normal or Shadow ) ) (get_saved_vars) ;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; To Place on layer cloud, color red (1) ;; remove the ;; from the next line ;;(command ".layer" "m" "cloud" "c" "1" "cloud" "") ;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= (setq dscale (getvar "dimscale") plw 0 ;(* 0.05 dscale); polyline width a90 (/ pi 2) a270 (* pi 1.5) 2pi (* pi 2) useds chord ; use dimscale flag ) (setq arcdata (arc_check)) (if (null(and (create_dcl "pl2cloud.dcl") (run_dialog))) (run_command_line)) ;; keep flag in case dimscale is changed (if useds (setq chord useds)) (*error* "") (gc) (princ) ) ;End program (prompt "\nEntrer PL2Cloud pour démarrer.") (princ) ;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,; ;;; End of main routine ;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,; ;;; -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- ;;; - ;;; Functions - ;;; - ;;; -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- ;;----------------------------------------------------------------- ;; Dialog Box - get ready to start the dialog for the first time ;;----------------------------------------------------------------- (defun run_dialog () (setq dcl_id (load_dialog "pl2cloud.dcl")) (if (new_dialog "pl2cloud" dcl_id) (progn (while (= (setq dialog_action (dialog_call)) 2) (initget 6) (if (setq tmp (getdist (strcat "\nSpecify arc length <" (rtos chord) ">: ") ) ) (setq chord tmp) ) (new_dialog "pl2cloud" dcl_id) ) ; while (if (= dialog_action 1) ; make the cloud (if (= draw_style "Pick") (do_pick_method) (do_draw_method) ) ) (unload_dialog dcl_id) T ; return True ) ; progn (alert "Clould not load pl2cloud.dcl.") ) ; endif ) ; defun run_dialog ;;====================================================== ;; Dialog Box - Tiles Set Up ;;====================================================== (defun dialog_call (/ rtnval) (setq x (dimx_tile "rc_img") y (dimy_tile "rc_img") ) (if (= cloud_style "Normal") (progn (start_image "rc_img") (slide_image 0 0 x y "rc_normal") (end_image) (set_tile "rbNormal" "1") ) (progn (start_image "rc_img") (slide_image 0 0 x y "rc_shadow") (end_image) (set_tile "rbShadow" "1") ) ) (setq x (dimx_tile "rc_lng_img") y (dimy_tile "rc_lng_img") ) (start_image "rc_lng_img") (slide_image 0 0 x y "rc_length") (end_image) (set_tile "edtLength" (rtos chord)) (if (in_paper_space) (set_tile "TitleMd" "Vous êtes dans l'Espace Papier, EP valeurs chargées.") (set_tile "TitleMd" "Vous êtes dans l'Espace Objet, EO valeurs chargées.") ) (action_tile "rbNormal" "(set_style $key)") (action_tile "rbShadow" "(set_style $key)") (action_tile "rc_img" "(set_style $key)") (action_tile "edtLength" "(get_arc_length $value)") (action_tile "btnPick" "(done_dialog 2)") (set_pick draw_style) (if keeppl (set_tile "KeepPl" "1") (set_tile "KeepPl" "0") ) (action_tile "accept" "(Get_Values)") ;(action_tile "help" "(rc_help)") (setq rtnval (start_dialog)) rtnval ) ; defun dialog_call ;;====================================================== ;; Dialog Box - get vars & exit dialog ;;====================================================== (defun get_values () (if (= (get_tile "KeepPl") "1") (setq keeppl t) (setq keeppl nil) ) (if (= (get_tile "radPick") "1") (setq draw_style "Pick") (setq draw_style "Draw") ) (done_dialog 1) ) ; defun get_values ;;====================================================== ;; Dialog Box - Pline Entry Method Buttons ;;====================================================== (defun set_pick (key) (if (= key "Pick") (progn (set_tile "radPick" "1") (set_tile "radDraw" "0") ) (progn (set_tile "radPick" "0") (set_tile "radDraw" "1") ) ) ) ; defun set_pick ;;====================================================== ;; Dialog Box - error check user entered length ;;====================================================== (defun get_arc_length (len / newlen) (setq len (strcase len) newlen (distof len) useds nil ; turn off the DimScale Feature ) (cond ((or (= len "") (<= newlen 0.0)) (set_tile "error" "Arc length must positive and nonzero.") ) (t (set_tile "error" "") (setq chord (distof len)) (set_tile "edtLength" (rtos chord)) ) ) ;cond ) ;defun get_arc_length ;;====================================================== ;; Dialog Box - Style Buttons ;;====================================================== (defun set_style (key / x y active) (setq x (dimx_tile "rc_img") y (dimy_tile "rc_img") ) (cond ((= key "rbNormal") (setq active "rc_normal" cloud_style "Normal" ) ) ((= key "rbShadow") (setq active "rc_shadow" cloud_style "Shadow" ) ) (t (if (= (get_tile "rbNormal") "1") (progn (setq active "rc_shadow" cloud_style "Shadow" ) (set_tile "rbShadow" "1") ) (progn (setq active "rc_normal" cloud_style "Normal" ) (set_tile "rbNormal" "1") ) ) ) ) (start_image "rc_img") (fill_image 0 0 x y 0) (slide_image 0 0 x y active) (end_image) ) ; defun set_style ;;================================================================== ;; this code is used if there is a problem with the dialog box code ;;================================================================== (defun run_command_line () ;; Get type of polyline input (prompt "\nDessine nuage de révision à partir d'une polyligne.") (while (null method) (initget "Pick Draw Options Shadow") (setq method (getkword (strcat "\nEntrer méthode pour obtenir polyligne. " "[Pick / Dessine / Options / Nuage] (ArcAng=" arcdata ") :" ) ) ) (cond ((= method "Options") ; set arc angle, chord length, Pline width (get_options) (setq arcdata (arc_check)) (setq method nil) ; stay in loop ) ((= method "Shadow") (if (= cloud_style "Normal") (setq cloud_style "Shadow") (setq cloud_style "Normal") ) (prompt (strcat "Cloud Style changed to " cloud_style)) (setq method nil) ; stay in loop ) ((null method) (setq method "Pick")) ; nil default to pick ) ; end cond stmt ) ; end while (initget "Yes No") (setq keeppl (getkword "\nKeep the original polyline [Yes No] :")) (if (null keeppl) (setq keeppl "No") ) (cond ((= method "Pick") (do_pick_method)) ((= method "Draw") (do_draw_method)) ) ; end cond stmt ) ; end defun run_command_line ;;================================================================== ;;====================================================== ;; Allow user to pick a pline ;;====================================================== (defun do_pick_method () (if (setq ent (entsel "\nSélectionnez la Polyligne pour dessiner le Nuage: ")) (if (member (cdr (assoc 0 (setq entlst (entget (car ent))))) '("LWPOLYLINE" "SPLINE" "CIRCLE" "ELLIPSE")) (progn (makecloud entlst) (if (or (= keeppl "No") (= keeppl nil)) (entdel (car ent)) ) ) (prompt "\nError - Not a LWpolyline.") ) ; endif ) ; endif ) ; end defun do_pick_method ;;====================================================== ;; Allow user to draw a pline ;;====================================================== (defun do_draw_method () (prompt "\nDessine la polyligne, C ferme la polyligne ou Entrer lorsque terminé." ) (setq oldent (entlast)) (command "_.pline") ;; repeat a point input until Enter (while (> (getvar "CMDACTIVE") 0) (command pause) ) (setq ent (entlast)) (if (null (eq ent oldent)) (makecloud (entget ent)) ) ; endif (if (or (= keeppl "No") (= keeppl nil)) (entdel ent) ) ) ; end defun do_draw_method ;;====================================================== ;; get variables stored in list ;;====================================================== (defun get_saved_vars () (if (in_paper_space); get paperspace vars (setq arcang (nth 1 pl2cloudglobal) chord (nth 3 pl2cloudglobal) ) ;; else get model space vars (setq arcang (nth 0 pl2cloudglobal) chord (nth 2 pl2cloudglobal) ) ) ;; get other user preferences (setq draw_style (nth 4 pl2cloudglobal)) (setq keeppl (nth 5 pl2cloudglobal)) (setq cloud_style (nth 6 pl2cloudglobal)) ); defun get_saved_vars ;;====================================================== ;; save variables in a global variable list ;;====================================================== (defun put_saved_vars () (if (in_paper_space); save paperspace vars (setq pl2cloudglobal (list (nth 0 pl2cloudglobal) (abs arcang) (nth 2 pl2cloudglobal) chord draw_style keeppl cloud_style ) ) ;; else save model space vars (setq pl2cloudglobal (list (abs arcang) (nth 1 pl2cloudglobal) chord (nth 3 pl2cloudglobal) draw_style keeppl cloud_style ) ) ) ); defun put_saved_vars ;;================================================================== ;; Test Title Mode returns T when in PS & Viewports are closed ;;================================================================== (defun in_paper_space () (and (= (getvar "tilemode") 0) ;In PS (= (getvar "cvport") 1) ; Vps Closed ) ); defun in_paper_space ;;====================================================== ;; routine to make the actual polyline cloud ;;====================================================== (defun makecloud (elst / pvl len closed loop pt1 p1 p2 ang divDist endParam totLen dist) ;;----------------------------------------------------------------- ;; <<< get points along an object >>> ;;----------------------------------------------------------------- ;; n is the number of intervals ;; e is the entity name ;; returns a list of points (vl-load-com) (setq dist 0.0) (setq obj (cdr (assoc -1 elst)) endParam (vlax-curve-getEndParam obj) totLen (vlax-curve-getDistAtParam obj endParam) ) ;; set arc distance and number of arc in segment ;; Arc chord length set to aprox (setq spcs (/ totlen chord)) ;Arc spacing (setq spcs (fix (+ 0.999 spcs))) ; round up (setq spcs (max 2 spcs)) ;min of 2 spaces (setq divDist (/ totlen spcs)) ;set arc distances (while (<= dist totLen) (setq pvl (cons (vlax-curve-getPointAtDist obj dist) pvl) dist (+ dist divDist) ) ) (setq pvl (reverse (cons (vlax-curve-getPointAtParam obj endParam) pvl))) ;; ??? may not need ;(if ; true if closed ; (setq closed (eq 1 (logand 1 (cdr (assoc 70 elst))))) ;; Closed pline, so add the 5th point ; (setq pvl (reverse (cons (car pvl) (reverse pvl)))) ;) (if (= (@polydir pvl) "CW") (setq arcang (- arcang)) ; Arc Angle ) ;; start polyline command with width and arc mode (command "PLINE" (car pvl) "W" plw "" "_A") (foreach pt pvl ;draw side segments (if (= cloud_style "Shadow") (command "_w" "0" (* chord 0.10)) ) (command "_A" arcang pt) ) ;;---------------------------------------------------- (if closed (command "CL") ;Close polyline (command "") ) ) ; end defun makecloud ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; Get Cloud Arc Options ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; used by command line version (defun get_options (/ loop newang newcd) (prompt "\nOptions to set Arc Angle and Chord Length.") ;; get arc angle ----------------------------------- (setq loop t) (while loop (initget 6) (setq newang (getint (strcat "\nEntrer l'angle du nouvel arc (90 @ 175 deg) <" (itoa arcang) "> :" ) ) ) (cond ((null newang) ; leave angle as is (setq loop nil) ) ((or (< newang 90) (> newang 175)) (alert "\nAngle out of range. Entrer entre 90 et 175") ) ((setq arcang newang) ; set new angle (setq loop nil) ) ) ; end cond stmt ) ; end while ;; get chord length ------------------------------ (setq loop t) (while loop (initget 2) (setq newcd (getreal (strcat "\nEnter a new Chord length or negative " "number to divide into DimScale <" (rtos chord 2 2) "> :" ) ) ) (cond ((null newcd) ; leave as is (setq loop nil) ) ((or (< newcd -5) (> newcd 500)) (alert "\nAngle out of range. Entrez entre -5 et 500") ) ((setq chord newcd) ; set new angle (if (< chord 0) (setq useds chord) ; save flag (setq useds nil) ; clear flag ) (setq loop nil) ) ) ; end cond stmt ) ; end while ;; get pline width ------------------------------ ) ; end defun get_options ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; Check Arc Data ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= (defun arc_check () ;; error check arc data (if (= (type arcang) "REAL") (setq arcang (fix arcang)) ; make integer ) (setq arcang (max 90 (min 175 arcang))) ; 90 <= ArcAng <= 175 (setq chord (if (= chord 0) -2 chord)) ; trap 0 only (if (< chord 0) ;; arc chord length set to (/ dist (dimscale / chord)) (setq useds chord ; save flag chord (/ dscale (abs chord)) ) ;; ELSE (setq useds nil) ; clear flag ) (strcat (rtos arcang 2 0) " Length=" (rtos chord 2 2)) ) ; end defun arc_check ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; return the list of vertex in pairs ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= (defun vert_lst (el / pvl) (setq pvl '()) (while (setq el (member (assoc 10 el) el)) (setq pvl (cons (cdar el) pvl) el (cdr el)) ) pvl ) ; end defun ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;; Return the direction of a lwpline ;; Modified form of ;; PolyDir.LSP v1.0 (03-05-02) John F. Uhden, Cadlantic ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= (defun @polydir (coords / i p1 p2 p3 sum) (setq i 1 sum 0.0 ) (repeat (- (length coords) 2) (setq p1 (nth (1- i) coords) p2 (nth i coords) i (1+ i) p3 (nth i coords) sum (+ sum (@delta (angle p1 p2) (angle p2 p3))) ) ) (if (minusp sum) "CW" "CCW") ) ; end defun ;;----------------------------------------------------------------------- ;; This function returns the deflection angle (in radians) of two angles: ;;----------------------------------------------------------------------- (defun @delta (a1 a2) (cond ((> a1 (+ a2 pi)) (setq a2 (+ a2 2pi))) ((> a2 (+ a1 pi)) (setq a1 (+ a1 2pi))) ) (- a2 a1) ) ; end defun ;; *************************************************** ;; create_dcl function to create a dcl support ;; file if it does not exist ;; Usage : (create_dcl "file name") ;; Returns : T if successful else nil ;; *************************************************** (defun create_dcl (fname / acadfn) ;;======================================= ;; check revision date Routine ;;======================================= (defun dcl-rev-check (fn / rvdate ln lp) ;; revision flag must match exactly and must ;; begin with // (setq rvflag "// Révision Control 10/22/2004@09:17" ) (if (setq fn (findfile fn)) (progn ; check rev date (setq lp 5) ; read 4 lines (setq fn (open fn "r")) ; open file for reading (while (> (setq lp (1- lp)) 0) (setq ln (read-line fn)) ; get a line from file (if (vl-string-search rvflag ln) (setq lp 0) ) ) ; end while (close fn) ; close the open file handle (if (= lp -1) nil ; no new dcl needed t ; flag to create new file ) ) ; end progn t ; flag to create new file ) ; endif ) ; defun (if (null(wcmatch (strcase fname) "*`.DCL")) (setq fname (strcat fname ".DCL")) ) (if (dcl-rev-check fname) ;; create dcl file in same directory as AutoCAD.PAT (progn (setq acadfn (findfile "ACAD.PAT") fn (strcat (substr acadfn 1 (- (strlen acadfn) 8))fname) fn (open fn "w") ) (foreach x (list "// WARNING file will be recreated if you change the next line" rvflag "//PL2cloud.dcl" "//" "" "pl2cloud : dialog {" " label = \"PL2Cloud - Révision Nuage Options Rev 2.0 - Par CAB\" ;" " spacer_1 ;" " : text { label = \"Sélectionne ou dessine une polyligne crée un nuage de révision.\";" " key = \"t1\";" " }" " : text { key = \"TitleMd\" ;" " }" " spacer_1 ;" "" " : boxed_row {" " label = \"Arc Style\" ;" " : image_button {" " color = 0 ;" " aspect_ratio = 0.8 ;" " fixed_width = true ;" " width = 11 ;" " key = \"rc_img\" ;" " }" " : radio_column {" " spacer_0 ;" " : radio_button {" " key = \"rbNormal\" ;" " label = \"Normal\" ;" " mnemonic = \"N\" ;" " }" " : radio_button {" " key = \"rbShadow\" ;" " label = \"Nuage\" ;" " mnemonic = \"S\" ;" " }" " spacer_0 ;" " }" " spacer_1 ;" " }" " spacer_1 ;" " : boxed_row {" " label = \"Arc Longueur de la corde\" ;" " : image {" " aspect_ratio = 0.8 ;" " color = 0 ;" " fixed_width = true ;" " key = \"rc_lng_img\" ;" " width = 11 ;" " }" " : column {" " : edit_box {" " label = \"Corde Longueur\" ;" " key = \"edtLength\" ;" " fixed_width = true ;" " edit_width = 6 ;" " }" " : button {" " fixed_width = true ;" " key = \"btnPick\" ;" " label = \"Détermine 2 points <\" ;" " // mnemonic = \"P\" ;" " width = 4 ;" " }" " }" " }" " " " " " " " spacer_1 ;" " : boxed_row {" " label = \"Options\" ;" " : radio_column {" " spacer_0 ;" " : radio_button {" " key = \"radPick\" ;" " label = \"Sélectionner polyligne existante\" ;" " mnemonic = \"P\" ;" " }" " : radio_button {" " key = \"radDraw\" ;" " label = \"Dessiner une nouvelle polyligne\" ;" " mnemonic = \"D\" ;" " }" " spacer_0 ;" " }" " : toggle { " " key = \"KeepPl\"; " " label = \"Extérieur polyligne\"; " " } " "" " }" " spacer_1 ;" "" " ok_cancel_err ;" "}" ) ; endlist (princ x fn) (write-line "" fn) ) ; end foreach (close fn) (setq acadfn nil) (alert (strcat "\nDCL file created, please restart the routine" "\n again if an error occures.")) t ; return True, file created ) ; end progn t ; return True, file found ) ; endif ) ; end defun ;;;*********************************** ;;; -=< End Of File >=- ;;;*********************************** ce dernier programme est complété par 3 fichiers (rc_normal.sld, rc_shadow.sld et rc_lenght.sld) dont je ne sais comment les joindre au message. :P
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer. Politique de confidentialité