pvsvprasad Posted September 10, 2016 Share Posted September 10, 2016 Dear programmers, I need one programmable Lisp for Feets to Meters Conversion Drawing. after conversion it should be showed with 2 digits only. example: after converting 1 foot line to meters, its showing 0.3048, but i need as a 0.30 only (while checking by List command or exporting points). So kindly provide any lisp program to solve this issue. Thanking you, Best regards. Quote Link to comment Share on other sites More sharing options...
halam Posted September 10, 2016 Share Posted September 10, 2016 Why would you bother? Did you make a mistake in the beginning that your Project country setting' was incorrect?. Solution: Use INSUNITS and xref your plans.. (keeping a short answer). Otherwise, loose a big amount of time converting to metric.. cheers hans from the Netherlands.. Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 10, 2016 Share Posted September 10, 2016 You could use the -DWGUNITS command to go from imperial units to metric units and the scaling will be done automatically by AutoCAD. Note the use of the dash before the command. It is required. Pay close attention to what is being conveyed to you on the command line by AutoCAD. Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 Why would you bother? Did you make a mistake in the beginning that your Project country setting' was incorrect?. Solution: Use INSUNITS and xref your plans.. (keeping a short answer). Otherwise, loose a big amount of time converting to metric.. cheers hans from the Netherlands.. Thank you for kind reply, i need both Feets and Meters unit drawings. i dont know about xrefs. any lisp is available for this task? Thank you, Best regards. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted September 10, 2016 Share Posted September 10, 2016 You could use the -DWGUNITS command to go from imperial units to metric units and the scaling will be done automatically by AutoCAD. Note the use of the dash before the command. It is required. Pay close attention to what is being conveyed to you on the command line by AutoCAD. Definitely the way to go. I recommend expanding your commandline history to display about 8 or 10 lines, as it will make it much easier to follow all of the options which are being offered. As ReMark says, pay close attention to the prompts and your responses, haste makes waste. Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 You could use the -DWGUNITS command to go from imperial units to metric units and the scaling will be done automatically by AutoCAD. Note the use of the dash before the command. It is required. Pay close attention to what is being conveyed to you on the command line by AutoCAD. Dear sir, your command is perfectly worked. but after data extraction shows negative values. how to fix this error. Thank you, Bestregads. feets to meters negative value error.dwg Quote Link to comment Share on other sites More sharing options...
Dadgad Posted September 10, 2016 Share Posted September 10, 2016 It sounds like what you really want to do is add ALTERNATE UNITS to your dimension style. In that way your dimensions can be displayed in both units at the same time. The dimension style shown in the screenshot is for a dwg which is done in mms, but which needs to also display Imperial dimensions. Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 It sounds like what you really want to do is add ALTERNATE UNITS to your dimension style. No sir, i need different file as a Meters units. with help of "-DWGUNITS" command it is solved. now my problem with negative values at data extraction. because originally those are positive values, why Data extraction Option Makes Negatives? Thanking you, Best regards. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted September 10, 2016 Share Posted September 10, 2016 There are many right click editing options available within the Data Extraction functionality. When it first displays the information shown in your screenshot, explore the right click options, before passing over that page in the dialog. Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 There are many right click editing options available within the Data Extraction functionality.When it first displays the information shown in your screenshot, explore the right click options, before passing over that page in the dialog. kindly describe which options? not only data extraction problem. if i export this drawing to another software, same negative values showed. what is the solution for this issue? Thanks. Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted September 10, 2016 Share Posted September 10, 2016 This is not an error but a logical consequence of the direction of the line: Start: (0,1.45,0) End: (0,0,0) Delta = End - Start = (0,-1.45,0) Is seems unlikely that the -DWGUNITS command reverses the direction of lines. So the original file must have had the same issue. But I can't test this since BricsCAD does not have this command. Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 Thank you Roy Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 You could use the -DWGUNITS command to go from imperial units to metric units and the scaling will be done automatically by AutoCAD. Note the use of the dash before the command. It is required. Pay close attention to what is being conveyed to you on the command line by AutoCAD. Dear Master, Can You arrange a Lisp routine with reference to your Command for below routine steps? -DWGUNITS command then choose 6th option then 2nd option(decimal) then "2" then Yes then Yes then Yes then Yes and set All Dimension styles to One dimension Style. Thank you in Advance, Best Regards. Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted September 10, 2016 Share Posted September 10, 2016 Probably this :- [b]([color="blue"]command [/color][color="magenta"]"-dwgunits"[/color] [color="seagreen"]6 2 4[/color] [color="magenta"]"_Y" "_Y"[/color])[/b] Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 Probably this :- [b]([color=blue]command [/color][color=magenta]"-dwgunits"[/color] [color=seagreen]6 2 4[/color] [color=magenta]"_Y" "_Y"[/color])[/b] Thank you for your kind reply.i think above code is not a lisp.and what about change all dimensions to one dimension style (my new dimension style name is "Meters")? please make a perfect lisp routine. Thank you. Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted September 10, 2016 Share Posted September 10, 2016 add 1 more command line [b]([color="blue"]command[/color] [color="magenta"]"._-dimstyle" "_r" "Meters"[/color])[/b] Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 add 1 more command line [b]([color="blue"]command[/color] [color="magenta"]"._-dimstyle" "_r" "Meters"[/color])[/b] Please make a Lisp version, because every time copy and paste is not possible. Thank you, Best regards. Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted September 10, 2016 Share Posted September 10, 2016 Try this :- (defun c:test () (command "-dwgunits" 6 2 4 "_Y" "_Y") (command "._-dimstyle" "_r" "Meters") (princ) ) Quote Link to comment Share on other sites More sharing options...
pvsvprasad Posted September 10, 2016 Author Share Posted September 10, 2016 Dear sir, thank you for sharing. with help of your lisp not changed my existing dim styles to new dim style (i.e new dim style "Meters") and asking for "Yes" Options at command prompt. please check and modify. Thankyou. Quote Link to comment Share on other sites More sharing options...
halam Posted September 10, 2016 Share Posted September 10, 2016 Ah. You are really after 'the perfect lisp' You still have to do somethings manual. You have to update dim. objects after you change the settings. Simply type 'all' to select them. Quote Link to comment Share on other sites More sharing options...
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.