woohhoo Posted June 25, 2013 Posted June 25, 2013 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. Quote
Tharwat Posted June 25, 2013 Posted June 25, 2013 It works here . What is the error report that you receive at the command line ? Quote
woohhoo Posted June 25, 2013 Author Posted June 25, 2013 This is what I get. No values, only ####. When I worked with Autocad2010 I didn't had that problem. Quote
woohhoo Posted June 25, 2013 Author Posted June 25, 2013 And this is what I get when I open the fieldbox. Quote
Tharwat Posted June 25, 2013 Posted June 25, 2013 I tried the code on Cad 2013 and it works fine , you may need to upload a sample drawing with the same arcs that you tried the codes on . Quote
woohhoo Posted June 25, 2013 Author Posted June 25, 2013 Below you find a sample. Could it be a wrong system variable property? sample_arc_error.dwg Quote
Tharwat Posted June 25, 2013 Posted June 25, 2013 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 . Quote
dbroada Posted June 25, 2013 Posted June 25, 2013 works here as expected - AutoCAD 2013 (Electrical) Quote
woohhoo Posted June 25, 2013 Author Posted June 25, 2013 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. Quote
neophoible Posted June 25, 2013 Posted June 25, 2013 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! 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. Quote
Tyke Posted June 25, 2013 Posted June 25, 2013 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. Quote
woohhoo Posted June 26, 2013 Author Posted June 26, 2013 :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! 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 Quote
woohhoo Posted June 26, 2013 Author Posted June 26, 2013 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 Quote
dbroada Posted June 26, 2013 Posted June 26, 2013 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). Quote
pBe Posted June 26, 2013 Posted June 26, 2013 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>%")) Quote
woohhoo Posted June 26, 2013 Author Posted June 26, 2013 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!! Also thx to everyone who worked on this problem too Quote
Tharwat Posted June 26, 2013 Posted June 26, 2013 You did not say that you have moved to a new OS 64 Good guess pBe Quote
woohhoo Posted June 27, 2013 Author Posted June 27, 2013 You did not say that you have moved to a new OS 64 Good guess pBe No I didn't. My mistake, sorry. 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.