Extract Scale Factor to Excel

Extract Scale Factor to Excel

Anonymous
Not applicable
658 Views
2 Replies
Message 1 of 3

Extract Scale Factor to Excel

Anonymous
Not applicable

Hello.

Hopefully someone can help.  I have 1,000+ .dwg files that have the wrong Scale Factor, and the drawing is scaled wrong.  I need to open each drawing, change the scale factor to 1, change the dimension scale to what the scale factor was, and then scale the drawing in model space to what the scale factor was. I don't want to do that manually. 

 

I've read about Data Extraction, but can't figure out how to extract the scale factor or the dim scale from the drawing, those data fields don't show up.

 

I am new at automating tasks in AutoCAD and would prefer the simplest way possible.  I don't understand the programming, or how to do that to accomplish this.

 

Any help would be greatly appreciated.

0 Likes
659 Views
2 Replies
Replies (2)
Message 2 of 3

WarrenGeissler
Advisor
Advisor

You are going to get a faster response and much better bandwidth posting this over in the AutoCAD Customization / LISP forum >>HERE<<
Some of this can be done with a macro, but it might be easier with LISP.


 


Warren Geissler
Drafting Manager Denver Water
_____________________________________________

Please ACCEPT AS SOLUTON if this works
(...and doesn't melt your computer or cause Armageddon)

0 Likes
Message 3 of 3

leeminardi
Mentor
Mentor

It sounds like you only want to do three things:

  1. change the scale factor to 1,
  2. change the dimension scale to what the scale factor was, and then
  3. scale the drawing in model space to what the scale factor was.

I am not sure what you mean by item #1.  Was the drawing not created in model space to full size? How would you go about determining the scale factor?

#2 can be change with the dimscale command

#3 is done with the scale command.

 

I'm no vlisp whiz but it sounds like following vlisp program might do much of what you want.  It prompts the user for what the scale factor was.  This could be changed to get the scale factor if you identify where that is stored. It then changes dimscale to that value and thaws and turns on all layer before scaling everything by 1/s.

(defun c:fixit (/)
  (setq s (getreal "\nEnter what the scale factor was:"))
					; do something to adjust scale factor
  (command "dimscale" s)
  (command "-layer" "t" "*" "on" "*" "")
  (command "scale" "all" "" "0,0,0" (/ 1 s))
)  

 

lee.minardi
0 Likes