Jump to content

Changing the computer does not draw the object in AutoCad


Berat

Recommended Posts

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.

 

image.thumb.png.19baafba3797017a9a660039668d3d6b.png


Please also see the attached complete Program.rar.

 

 

Please look this: https://shorturl.at/qR345

Program.rar

Edited by Berat
Link to comment
Share on other sites

  • Berat changed the title to Changing the computer does not draw the object in AutoCad

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.

 

 

Link to comment
Share on other sites

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)

)

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Aha let's wait another people if anyone can help me to resolve this.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Maybe you should give all details on the two computers and which one works.

Link to comment
Share on other sites

All of them.

 

Operating System and version, computer specifications, graphics card, etc.

 

Did you read the information in the link I posted?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...