Berat Posted March 26, 2024 Posted March 26, 2024 (edited) I have UserForm in AutoCad 2006, from which i Draw Polygons, Parcels etc, when I go to another PC, same code, same everything, UserForms just Draw some lines like numbers. Please also see the attached complete Program.rar. Please look this: https://shorturl.at/qR345 Program.rar Edited March 26, 2024 by Berat Quote
BIGAL Posted March 28, 2024 Posted March 28, 2024 Please use zip easier to uncompress. Did not open rar. You probably need to look at your text style, the object is possibly there but the text is huge. Quote
Berat Posted March 28, 2024 Author Posted March 28, 2024 Dear, Please find zipped file my program, so please find also one file Parcel.csv, when I try in my Pc, this is the results as below in Image.png, Programi.zip Parcela_00902-0.csv Quote
BIGAL Posted March 30, 2024 Posted March 30, 2024 Try this (defun c:wow ( / csv->lst fname fo lst lst2 obj ptc) ; thanks to Lee-mac for this defun (defun csv->lst44 ( str / pos ) (if (setq pos (vl-string-position 44 str)) (cons (substr str 1 pos) (csv->lst44 (substr str (+ pos 2)))) (list str) ) ) (defun LWPoly (lst cls) (entmakex (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length lst)) (cons 70 cls)) (mapcar (function (lambda (p) (cons 10 p))) lst))) ) (setq fo (open (getfiled " Select csv File" "" "csv" 20) "R")) (setq lst '()) (while (setq nline (read-line fo)) (setq lst (cons (csv->lst44 nline) lst)) ) (close fo) (setq lst (reverse lst)) (setq lst2 '()) (foreach val lst (setq lst2 (cons (list (atof (nth 1 val))(atof (nth 2 val))) lst2)) ) (LWPoly lst2 1) (command "zoom" "E") (setq obj (vlax-ename->vla-object (entlast))) (setq ptc (osnap (vlax-curve-getStartPoint obj) "gcen")) (setq area (strcat (rtos (vlax-get obj 'area) 2 2) "m\U+00B2")) (command "Text" ptc "" 0.0 area) (princ) ) Quote
Berat Posted April 1, 2024 Author Posted April 1, 2024 Dear my Friends, Thank you very very much for your code and for everything else, but as you can see I have userform, i have a lot of buttons, commands etc etc, so I cant implement Lisp Codes within VBA userforms, so in this case I need VBA code to realize it. Thanks a lot Quote
BIGAL Posted April 4, 2024 Posted April 4, 2024 If your waiting for me I dabble in VBA spend 99% of time in lisp. So sorry can not help. Quote
Berat Posted April 5, 2024 Author Posted April 5, 2024 Aha let's wait another people if anyone can help me to resolve this. Quote
SLW210 Posted April 5, 2024 Posted April 5, 2024 I get this with your code. Quote Compile error: The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute. SEE THIS Quote
SLW210 Posted April 5, 2024 Posted April 5, 2024 Maybe you should give all details on the two computers and which one works. Quote
Berat Posted April 11, 2024 Author Posted April 11, 2024 Which details I must check my friends please. Quote
SLW210 Posted April 11, 2024 Posted April 11, 2024 All of them. Operating System and version, computer specifications, graphics card, etc. Did you read the information in the link I posted? Quote
Berat Posted April 12, 2024 Author Posted April 12, 2024 Dear My Friends, First of all thank you for your help and supprot, I am not sure if is allowed, but I would like whenever you can, I can share my Screen and to see if you can resolve this please. I have read but I didn't understood sincerly. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.