Jump to content

Lisp routine doesn't work anymore


woohhoo

Recommended Posts

Hi guys

 

I just had an upgrade of Autocad 2010 to 2013. However, a very important lisproutine doesn't work properly anymore.

What has happened? Can someone help me please?

 

With the lisp I can select several arcs (not polylines!) and when I enter the length and the radius appeares above the selected lines.

 

ARCRLVOOR_DimVoorSnijden.lsp

 

Thx.

Link to comment
Share on other sites

Below you find a sample. Could it be a wrong system variable property?

 

 

Everything is working normally here on that attached drawing .

 

Try the code on a new drawing .

 

Hope someone else try it as well to have more than one test on codes and drawing .

Link to comment
Share on other sites

I tried the code on a new drawing and the result is the same. No values are shown :(.

I also hope that someone else want to try it.

Anyway, thx for your help.

Link to comment
Share on other sites

I just had an upgrade of Autocad 2010 to 2013. However, a very important lisproutine doesn't work properly anymore.
:oops:Well, that was pretty dumb. I downloaded the DWG thinking I would take a look at it. But I was looking at the OP's "Using", totally ignoring he just upgraded!:lol: If you can dumb it down by saving it to the 2010 format or earlier, I can still take a look when I get a chance.:)
Link to comment
Share on other sites

Doesn't work here on 2013 or 2014. I saved it down to 2004 but it still doesn't work in 2012 or 2011.

 

What language are you using for your OS. I have German, I know Dave has English but I'm not sure what Tharwat has.

Link to comment
Share on other sites

:oops:Well, that was pretty dumb. I downloaded the DWG thinking I would take a look at it. But I was looking at the OP's "Using", totally ignoring he just upgraded!:lol: If you can dumb it down by saving it to the 2010 format or earlier, I can still take a look when I get a chance.:)

 

Hi

 

Here is the 2010 version :)

 

sample_arc_error_2010.dwg

 

Thx

Link to comment
Share on other sites

Doesn't work here on 2013 or 2014. I saved it down to 2004 but it still doesn't work in 2012 or 2011.

 

What language are you using for your OS. I have German, I know Dave has English but I'm not sure what Tharwat has.

 

I have Windows and 7 and the language is English. My previous version of Autocad was 2010 and I worked with Windows XP.

New computer new version of Autocad and yet I've more problems as before :(

Link to comment
Share on other sites

Doesn't work here on 2013 or 2014. I saved it down to 2004 but it still doesn't work in 2012 or 2011.

 

What language are you using for your OS. I have German, I know Dave has English but I'm not sure what Tharwat has.

yep, English 2013 on Windows XP (16 bit obviously).
Link to comment
Share on other sites

Perhaps this

 

(defun LM:GetObjectID ( doc obj )
 (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
   (vlax-invoke-method (vla-get-Utility doc) 'GetObjectIdString obj :vlax-false)
   (itoa (vla-get-Objectid obj))
 )
)

 

 

(setq id (LM:GetObjectID
              (vla-get-activedocument
                    (vlax-get-acad-object))
              arcobj))
(setq radstr (strcat "R=%<\\AcObjProp Object(%<\\_ObjId "
                    id
                    ">%).Radius \\f \"%pr2%lu2%ds44>%"))
(setq lenstr
          (strcat "\\PL=%<\\AcObjProp Object(%<\\_ObjId "
                  id
                  ">%).ArcLength \\f \"%ct8[1000]%pr0%lu2%ds44>%"))

Link to comment
Share on other sites

Perhaps this

 

(defun LM:GetObjectID ( doc obj )
 (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
   (vlax-invoke-method (vla-get-Utility doc) 'GetObjectIdString obj :vlax-false)
   (itoa (vla-get-Objectid obj))
 )
)

 

 

(setq id (LM:GetObjectID
              (vla-get-activedocument
                    (vlax-get-acad-object))
              arcobj))
(setq radstr (strcat "R=%<\\AcObjProp Object(%<\\_ObjId "
                    id
                    ">%).Radius \\f \"%pr2%lu2%ds44>%"))
(setq lenstr
          (strcat "\\PL=%<\\AcObjProp Object(%<\\_ObjId "
                  id
                  ">%).ArcLength \\f \"%ct8[1000]%pr0%lu2%ds44>%"))

 

Yes, problem solved!!

This works great. Thank you very much, pBe!!

 

:D

 

Also thx to everyone who worked on this problem too :thumbsup:

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...