i didn't pay attention to these z scale for a long time, but today someone checked this and says its causing like 80mm error. it's actually quite a big deal.
anyways. for once i have to say microstation do better on the scale command. that software can force z to be 1.0 and x and y to be anything.
here i made a program which will deal with polyline (contours) and aeccpoints.
rename dwg to dll and command is ccv
works with 2012 only.
I know this is an old thread, but in case someone else searches for this topic, the following lisp code will scale the points from a basepoint you pick and using your scale factor. Elevations will be maintained.
Copy and paste into notepad and save as any file name, but extension must be .lsp.
(vl-load-com) (defun c:go() (getdoc) ;select points to scale (prompt "\nSelect points to scale: ") (setq ss (ssget)) (setq len (sslength ss) ctr 0) ;get basepoint (setq p1 (getpoint "\nPick BasePoint: ")) (setq sc (getreal "\nEnter Scale Factor: ")) (while (< ctr len) (setq curpt (ssname ss ctr)) (setq obtyp (cdr (assoc 0 (entget curpt)))) (if (= obtyp "AECC_COGO_POINT") (progn (setq vpt (vlax-ename->vla-object curpt)) (setq curz (vlax-get-property vpt 'Elevation)) (vl-cmdf "Scale" curpt "" p1 sc) (vlax-put-property vpt 'Elevation curz) );end progn );end if (setq ctr (1+ ctr)) );end while (vl-cmdf "REGEN") (princ) ) ;end GO (defun getdoc () (setq prod (vlax-product-key)) (setq aecappno (strcat "AeccXUiLand.AeccApplication" (cond ((vl-string-search "\\R17.0\\" prod) ".4.0" ) ;;2007 ((vl-string-search "\\R17.1\\" prod) ".5.0" ) ;;2008 ((vl-string-search "\\R17.2\\" prod) ".6.0" ) ;;2009 ((vl-string-search "\\R18.0\\" prod) ".7.0" ) ;;2010 ((vl-string-search "\\R18.1\\" prod) ".8.0" ) ;;2011 ((vl-string-search "\\R18.2\\" prod) ".9.0" ) ;;2012 ((vl-string-search "\\R19.0\\" prod) ".10.0" ) ;;2013 ((vl-string-search "\\R19.1\\" prod) ".10.3" ) ;;2014 (t "") ) ) ) (setq acadapp (vlax-get-acad-object) c3dapp (vla-getinterfaceobject acadapp aecappno) C3Ddoc (vla-get-activedocument C3Dapp) ) ) ;end function
Best regards,
Tim
Import the points into a survey database via fbk file and include the line "SCALE FACTOR 1.000125" at the top of the file.
Hey Matt,
When I cut and paste that link, http://www.civil3d.com/2009/10/scale-your-points-keep-the-elevations/, it takes me to an Autodesk page. Did they steal your url?
Tim
You will need to get your survey database setup for this to work properly. Once you do that you can insert points from your survey database to your drawing and with the proper settings in the drawing utilities > drawing settings> transformation settting; your points will translate as you wish.
There is alot that goes into what I just posted above, particularly in how you setup your survey database and how you setup your drawing templates. Civil3d works great but it requires a massive amount of proper setup (and testing on non-project files) before you would ever want to use it on a real project.
Scaling everything would be a challenge, indeed. There are several Civil 3D object types you would want to ignore: Surfaces, Assemblies, Subassemblies, Sample Lines.
Most commonly, I am asked about scaling points or polylines. The LISP code I posted earlier in this thread handles Points. Handling 2d polylines is even simpler. If anyone needs code for that, just let me know: tcorey at shasta dot com.
Happy holidays to everyone,
Tim
1) how can i use your thread
2) and after i save it as lsp should i copy it to some place and update the Autocad commands
i am kinda confused here with your answer since my experience in civil 3d is not much its just 2 years
also can this help in scaling the contour lines too
Hi, Tim,
If you're still around, I tried to use your GO lisp routine in Civil 3D 2018 and got a load error (imagine that). I even reformatted it in VLISP with no luck. Any thoughts?
; error: Automation Error. Problem in loading application
Thanks in advance,
Andy Urban, STT
Yes, I'm still around.
That error is a version problem. The code works for versions up to 2014. If you will send me a reminder email, support at deltaengineeringsystems dot com, I will post an update this week.
Hi Tim, I've only had cause to use one 'lisp' before, that was 'z' arc, to make an arc relevant to the end and mid point elevations. To do that I just copy and paste it into the command bar and it's in there for the duration of that session. I have tried it with this lisp for maintaining the original 'z' values of points but without any joy. So I'm not sure if I'm executing it correctly in the operation. I did copy and paste it into my command bar, then selected 'ALL', > 'SCALE', > for the base point I put in '0', TAB '0' as I want to scale the x/y coordinates from millimetres to metres, press 'ENTER', specify scale factor as 0.001 > 'ENTER', the dwg has moved to the correct x/y coordinates but when I check the 'z' values, they have scaled aswell. So I guess I'm not using the 'lisp' correctly then. Any guidance would be much appreciated. Thanks,
Kind regards,
Bruceebru