Aller au contenu

jlbourbeau

Membres
  • Compteur de contenus

    3
  • Inscription

  • Dernière visite

Tout ce qui a été posté par jlbourbeau

  1. Un gros merci. le stringp est corriger une dernière question j'ai l'erreur suivant "erreur: caractère lu incorrect (octal): 30" je ne pense pas que c'est du au code mais sa arrive après avoir charger les DLL personnaliser pour le bureau. Voici le code corriger (prompt "\nType LoginProfile to run......") (vl-load-com) (defun C:LoginProfile (/ profilename acadprofiles actprofile thelist profilepath) ;;retrieve the users login name (setq profilename (strcase"NEUF_2018")) ;;retrieve a reference to the Profiles (setq acadprofiles (vla-get-profiles (vla-get-preferences (vlax-get-Acad-Object)) ) ) ;;retrieve the Active Profile (setq actprofile (strcat (vla-get-ActiveProfile acadprofiles))) ;;if they are not the same (if (/= profilename actprofile) ;;do the following (progn ;;get a list of the loaded profiles (vlax-invoke-method acadProfiles 'GetAllProfileNames 'thelist) ;;convert to a list (setq thelist (vlax-safearray->list thelist)) ;;if the profile is not in the list (if (not (member profilename thelist)) ;;do the following (progn ;;store the profile file (setq profilepath (strcat "\\\\architecture.local\\NEUF\\Outils\\Y-Système\\Y1-Autocad\\2018\\Y14-Routines\\NEUF_2018_ARG\\Deploy_2018\\" profilename ".arg" ) ) ;;if the profile is found (if (findfile profilepath) ;;do the following (progn ;;load the profile (setq NewProfile (vlax-invoke-method acadprofiles 'ImportProfile profilename profilepath :vlax-true) ) ;;make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ progn ;;profile file cannot be found - exit (prompt (strcat "\nCannot find profile " profilepath)) ) ;_ if ) ;_ progn ;;it is loaded but make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ if ) ;_ progn ;;We could reload the Profile if we wish. ;;Just uncomment the next line. (vlax-invoke-method acadProfiles 'ResetProfile profilename) ) ;_ if (princ) ) ;_;defun (princ)
  2. Je tiens a vous remercier pour vo tentative. Le problème est toujours le même avec : (prompt "\nType LoginProfile to run......") (vl-load-com) (defun C:LoginProfile (/ profilename acadprofiles actprofile thelist profilepath) ;;retrieve the users login name (setq profilename (strcase (getvar "NEUF_2018"))) ;;retrieve a reference to the Profiles (setq acadprofiles (vla-get-profiles (vla-get-preferences (vlax-get-Acad-Object)) ) ) ;;retrieve the Active Profile (setq actprofile (strcat (vla-get-ActiveProfile acadprofiles))) ;;if they are not the same (if (/= profilename actprofile) ;;do the following (progn ;;get a list of the loaded profiles (vlax-invoke-method acadProfiles 'GetAllProfileNames 'thelist) ;;convert to a list (setq thelist (vlax-safearray->list thelist)) ;;if the profile is not in the list (if (not (member profilename thelist)) ;;do the following (progn ;;store the profile file (setq profilepath (strcat "\\\\architecture.local\\NEUF\\Outils\\Y-Système\\Y1-Autocad\\2018\\Y14-Routines\\NEUF_2018_ARG\\Deploy_2018\\" profilename ".arg" ) ) ;;if the profile is found (if (findfile profilepath) ;;do the following (progn ;;load the profile (setq NewProfile (vlax-invoke-method acadprofiles 'ImportProfile profilename profilepath :vlax-true) ) ;;make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ progn ;;profile file cannot be found - exit (prompt (strcat "\nCannot find profile " profilepath)) ) ;_ if ) ;_ progn ;;it is loaded but make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ if ) ;_ progn ;;We could reload the Profile if we wish. ;;Just uncomment the next line. (vlax-invoke-method acadProfiles 'ResetProfile profilename) ) ;_ if (princ) ) ;_;defun (princ) J'ai même testé tout ramené sur mon bureau le arg et refaire le chemin vers celui du bureau sa bonne le meme résultat (setq profilepath (strcat "C:\\Users\\jlbourbeau\\Desktop\\" profilename ".arg"))
  3. Bonjour à tous, Je suis nouveau sur CADxp, je prend la chance de vous exposé mon problème. J'ai reprit un lisp et changer les chemins. mais j'ai une "Erreur : type d'argument incorrect: stringp nil" le lisp est supposé aller chercher le profile et le charger. et le chemin est bien écrit. merci, de me donner un coup de main avec ceci. ;;===========code start============ (prompt "\nType LoginProfile to run......") (vl-load-com) (defun C:LoginProfile (/ profilename acadprofiles actprofile thelist profilepath) ;;retrieve the users login name (setq profilename (strcase (getvar "NEUF_2018"))) ;;retrieve a reference to the Profiles (setq acadprofiles (vla-get-profiles (vla-get-preferences (vlax-get-Acad-Object)) ) ) ;;retrieve the Active Profile (setq actprofile (strcat (vla-get-ActiveProfile acadprofiles))) ;;if they are not the same (if (/= profilename actprofile) ;;do the following (progn ;;get a list of the loaded profiles (vlax-invoke-method acadProfiles 'GetAllProfileNames 'thelist) ;;convert to a list (setq thelist (vlax-safearray->list thelist)) ;;if the profile is not in the list (if (not (member profilename thelist)) ;;do the following (progn ;;store the profile file (setq profilepath (strcat "\\architecture.local\NEUF\Outils\Y-Système\Y1-Autocad\2018\Y14-Routines\NEUF_2018_ARG\Deploy_2018" profilename ".arg" ) ) ;;if the profile is found (if (findfile profilepath) ;;do the following (progn ;;load the profile (setq NewProfile (vlax-invoke-method acadprofiles 'ImportProfile profilename profilepath :vlax-true) ) ;;make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ progn ;;profile file cannot be found - exit (prompt (strcat "\nCannot find profile " profilepath)) ) ;_ if ) ;_ progn ;;it is loaded but make the profile the Active Profile (vla-put-ActiveProfile acadProfiles profilename) ) ;_ if ) ;_ progn ;;We could reload the Profile if we wish. ;;Just uncomment the next line. ;;(vlax-invoke-method acadProfiles 'ResetProfile profilename) ) ;_ if (princ) ) ;_;defun (princ) ;;========== end code===========
×
×
  • 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é