CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.092.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedlisps in german/oth​er language

 Post Reply Post Reply
Author
germanbarry View Drop Down
Groupie
Groupie


Joined: 14.Apr.2011
Location: Germany
Using: AutoCAD 2011
Status: Offline
Points: 33
Direct Link To This Post Topic: lisps in german/oth​er language
    Posted: 27.Jun.2011 at 11:31
I recently started working in germany and have my CAD installed in english, so all the lisps I used in Australia work fine. I wanted to share some lisps I use with some colleagues, but of course they don't work due to the language barrier as their CAD/machines are in german, mine in english.
attached are the few that i use.
 
I've only ever downloaded and used lisps, so don't know exactly how the script is written and/or exactly what needs to be edited to get it to work in BOTH languages (or to change the lisp to just work in german if both languages can't work from the one script), but if you know what needs changing from any of these scripts it'd be much appreciated!
 
primarily the PLJOIN lisp - they are licking their lips here at that command!
Note: The TLEN lisp attached seems to work on german machines... no idea why, but thought it might be important to share.
 
 
***edit***
From help: "Images can be added to your posts, if the forum administrators have allowed uploading..."
guess I'll have to wait to upload the lisps. if you can help either way, let me know!!


Edited by germanbarry - 27.Jun.2011 at 11:35
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2104
Direct Link To This Post Posted: 27.Jun.2011 at 11:45
You can upload files using the Reply button (full, not the Quick reply).
 
As for the language - make sure your LISP code call the globalized command names (and options) - e.g. "_CIRCLE", not "CIRCLE"; "_Cen", not "Cen".
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top
germanbarry View Drop Down
Groupie
Groupie


Joined: 14.Apr.2011
Location: Germany
Using: AutoCAD 2011
Status: Offline
Points: 33
Direct Link To This Post Posted: 27.Jun.2011 at 12:48
what i don't understand is why the TLEN works in both languages but the others don't - the TLEN has english-only code:
 
(defun C:TLEN (/ ss tl n ent itm obj l)
  (setq ss (ssget)
        tl 0
        n (1- (sslength ss)))
  (while (>= n 0)
    (setq ent (entget (setq itm (ssname ss n)))
          obj (cdr (assoc 0 ent))
          l (cond
              ((= obj "LINE")
                (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent))))
              ((= obj "ARC")
                (* (cdr (assoc 40 ent))
                   (if (minusp (setq l (- (cdr (assoc 51 ent))
                                          (cdr (assoc 50 ent)))))
                     (+ pi pi l) l)))
              ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE")
                   (= obj "LWPOLYLINE")(= obj "ELLIPSE"))
                (command "_.area" "_o" itm)
                (getvar "perimeter"))
              (T 0))
          tl (+ tl l)
          n (1- n)))
  (alert (strcat "Total length of selected objects is " (rtos tl)))
  (princ)
)
 
compared to the SELLAY lisp (below), I can't seem to find many commands that need the understrike beforehand... these two examples are the copy/paste text from the (english) functioning lisps. The SELLAY one below looks rather simple/small, so if anyone knows where to make the edits, please do so and highlight somehow so i can see what to look for. The lisp for pljoin is huge though, so i dunno how I'd go when locating all of those amendments, esp since you don't know where the lsp falls down when it does.
 
(defun C:SELLAY ( / e ss i)
 (setq i (ssget "_I"))
 (setq e (nentsel "Select entity on a layer: "))
 (if e (setq ss (ssget (if i "_I" "_X") (list(cons 8 (cdr (assoc 8 (entget (car e)))))))))
 (if (zerop (getvar "CMDACTIVE"))
  (progn (sssetfirst ss ss)(princ "Use 'P' for this selection set: ")(princ))
   ss
 )
)
(defun C:SELLAYS ( / e lay ss layl i)
 (setq i (ssget "_I"))
 (setq layl ""  ss (ssadd))
 (while (setq e (nentsel "\nSelect entity on a layer <exit>: "))
  (setq layl (strcat layl "," (cdr (assoc 8 (entget (car e))))))
  (princ (substr layl 2))
 );while
 (setq layl (substr layl 2))
 (if (> layl "") (setq ss (ssget (if i "_I" "_X") (list (cons 8 layl)))))
 (if (zerop (getvar "CMDACTIVE"))
  (progn (sssetfirst ss ss)(princ "Use 'P' for this selection set: ")(princ))
   ss
 )
)
(princ "\nXanadu SELLAY + SELLAYS commands loaded.")(princ)
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2104
Direct Link To This Post Posted: 27.Jun.2011 at 13:00
I didn't notice first that you were talking about our LISP utilities. All of our tools should work fine in any language version of AutoCAD.
 
There may be localization/globalization bugs in specific AutoCAD versions - this may cause that some tools fail. In this case I would suspect the "_I" and "_X" options. Try to use plain "I" and "X" instead (we have not specifically tested German AutoCAD).
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top
germanbarry View Drop Down
Groupie
Groupie


Joined: 14.Apr.2011
Location: Germany
Using: AutoCAD 2011
Status: Offline
Points: 33
Direct Link To This Post Posted: 27.Jun.2011 at 13:29
aaaarrgh!
sorry for wasting your time, but i just realised that the TLEN lisp was the only one which worked because it was the only one i dragged into my CAD window! my fecking brain must have assumed i dragged all of them in and was confused as to why the rest weren't working...
 
 
thanks for the support either way!
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,141 seconds.