Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I disable AECDWGSETUP in Civil 3D?

27 REPLIES 27
Reply
Message 1 of 28
pmascaro
1163 Views, 27 Replies

How do I disable AECDWGSETUP in Civil 3D?

This is part of AutoCAD Architectural. Not sure how but it is in a lot of my drawings. (I Never Installed Architectural or Architectural OE but it's in my old AutoCAD template and now in all of our old CAD Drawings that were started in AutoCAD (Not started in C3D / C3D template is Ok)

I use Civil 3D a lot and all of our old AutoCAD Drawings have this setting default to inches and when I open them up in Civil 3D my Units show inches even though Civil 3D isn't suppose to have inches as a unit. This AEC Unit overrides C3D's default and you have to then go into Civil 3D's Units setup in every drawing and change it... (This has kept us from fully converting over to C3D)

Does anyone know if there is a way to disable this?

I would like to disable AECDWGSETUP on start up through. Maybe through acaddoc.lsp
Is there a way to do this or is there a way to completely delete this override?
Or is there a script I can run to force these units to feet so they do not conflict with my Civil 3D Imperial?

Thanks!!
Paul
27 REPLIES 27
Message 21 of 28
pmascaro
in reply to: pmascaro

Hey Jeff,

This has been working great. Forgive my greediness but do you per chance know the code to add to get the "Set AutoCAD variables to match" to be checked on?

Thanks Again for all your efforts on this!
Message 22 of 28
Anonymous
in reply to: pmascaro

Hi Paul,
Yes, I do know that code.

You're welcome.

:-)

Oh, I guess you want to know the code, too....

Just like the last time, add one line of code to the existing code right
after that last one:

(vlax-put settings 'matchautocadvariables :vlax-true)

Jeff

"Paul Mascaro" wrote in message news:6359283@discussion.autodesk.com...
> Hey Jeff,
>
> This has been working great. Forgive my greediness but do you per chance
> know the code to add to get the "Set AutoCAD variables to match" to be
> checked on?
>
> Thanks Again for all your efforts on this!
Message 23 of 28
pmascaro
in reply to: pmascaro

Hi Jeff,

Cool, Thanks Again!

Ugh! I almost had it...
I looked at your previous post and tried the same thing but with a 0 at the end and a 1 at the end...
I did "(vlax-put settings 'matchautocadvariables 0)" "(vlax-put settings 'matchautocadvariables 1)"
null....

Figures... this one is true or false.... see what happens when a novice takes a shot at it... :^)
Message 24 of 28
Anonymous
in reply to: pmascaro

If you would've tried -1 it would've worked.... 🙂

Don't ask me why they made True = -1 but if you (vlax-dump-object settings
nil) when it is true you will see that it is stored as -1.

I think they do that on purpose to trip up people.

"Paul Mascaro" wrote in message news:6360298@discussion.autodesk.com...
> Hi Jeff,
>
> Cool, Thanks Again!
>
> Ugh! I almost had it...
> I looked at your previous post and tried the same thing but with a 0 at
> the end and a 1 at the end...
> I did "(vlax-put settings 'matchautocadvariables 0)" "(vlax-put settings
> 'matchautocadvariables 1)"
> null....
>
> Figures... this one is true or false.... see what happens when a novice
> takes a shot at it... :^)
Message 25 of 28
pmascaro
in reply to: pmascaro

Jeff-

Do you do Freelance Programing?

I'm still trying to obtain the source code for a VB5 app that I need upgraded to an x64 (R) 2010 Compatible app. If I can get the code I will need an experienced programmer to give me an estimate to update it.

Thanks,
-Paul
Message 26 of 28
pmascaro
in reply to: pmascaro

Hey Jeff,

 

I hope all is well!

 

I've been using this for years now and it's been working great. I've just been adding the following.

 

((vl-string-search "R18.0" vrsn) (setq appstr "7.0"))
 ;;2010
 ((vl-string-search "R18.1" vrsn) (setq appstr "8.0"))
 ;;2011
 ((vl-string-search "R18.2" vrsn) (setq appstr "9.0"))
 ;;2012
 ((vl-string-search "R18.3" vrsn) (setq appstr "10.0"))
 ;;2013
 ((vl-string-search "R19.0" vrsn) (setq appstr "11.0"))
 ;;2014
 (t (alert "This version of C3D not supported!"))

 

But it dosn't seem to be working any more.... Any ideas? Below is all of the code.... Thanks Again!!

 

;;
(defun jmm-resetunits (/ vrsn appstr acad-app civil-app civil-doc curunits
settings)
  (vl-load-com)
  (setq vrsn (vlax-product-key))
  ;;not sure if this command was available in earlier versions
  (cond ((vl-string-search "R18.0" vrsn) (setq appstr "7.0"))
 ;;2010
 ((vl-string-search "R18.1" vrsn) (setq appstr "8.0"))
 ;;2011
 ((vl-string-search "R18.2" vrsn) (setq appstr "9.0"))
 ;;2012
 ((vl-string-search "R18.3" vrsn) (setq appstr "10.0"))
 ;;2013
 ((vl-string-search "R19.0" vrsn) (setq appstr "11.0"))
 ;;2014
 (t (alert "This version of C3D not supported!"))
  )
  (if appstr
    (progn
      (setq acad-app  (vlax-get-acad-object)
     civil-app (vlax-invoke-method
   acad-app
   'Getinterfaceobject
   (strcat "AeccXUiLand.AeccApplication." appstr)
        ) ;_ end of vlax-invoke-method
     civil-doc (vla-get-ActiveDocument civil-app)
     settings  (vlax-get (vlax-get (vlax-get civil-doc 'settings)
       'drawingsettings
    )
    'unitzonesettings
        )
      )
      (setq curunits (vlax-get settings 'drawingunits))
      (if (> curunits 2);;not feet or meters
 (progn
   (if (= 0 (getvar "measureinit"))
     (vlax-put settings 'drawingunits 1);;feet
     (vlax-put settings 'drawingunits 2);;meters
   )
 )
      )
     (vlax-put settings 'ScaleObjectsFromOtherDrawings 0)
     (vlax-put settings 'matchautocadvariables :vlax-true)
    )
  )
)
(jmm-resetunits)
;;

 

 

Message 27 of 28
pmascaro
in reply to: pmascaro

Jeff:

 

Nevermind, I figured it out. I had an extra release and my R19 backwards.... Below is the update and it works...

 

Thanks Again for this Excelent Code!!

 

 

;;
(defun jmm-resetunits (/ vrsn appstr acad-app civil-app civil-doc curunits
settings)
  (vl-load-com)
  (setq vrsn (vlax-product-key))
  ;;not sure if this command was available in earlier versions
  (cond ((vl-string-search "R18.0" vrsn) (setq appstr "7.0"))
 ;;2010
 ((vl-string-search "R18.1" vrsn) (setq appstr "8.0"))
 ;;2011
 ((vl-string-search "R18.2" vrsn) (setq appstr "9.0"))
 ;;2012
 ((vl-string-search "R19.0" vrsn) (setq appstr "10.0"))
 ;;2013
 (t (alert "This version of C3D not supported!"))
  )
  (if appstr
    (progn
      (setq acad-app  (vlax-get-acad-object)
     civil-app (vlax-invoke-method
   acad-app
   'Getinterfaceobject
   (strcat "AeccXUiLand.AeccApplication." appstr)
        ) ;_ end of vlax-invoke-method
     civil-doc (vla-get-ActiveDocument civil-app)
     settings  (vlax-get (vlax-get (vlax-get civil-doc 'settings)
       'drawingsettings
    )
    'unitzonesettings
        )
      )
      (setq curunits (vlax-get settings 'drawingunits))
      (if (> curunits 2);;not feet or meters
 (progn
   (if (= 0 (getvar "measureinit"))
     (vlax-put settings 'drawingunits 1);;feet
     (vlax-put settings 'drawingunits 2);;meters
   )
 )
      )
     (vlax-put settings 'ScaleObjectsFromOtherDrawings 0)
     (vlax-put settings 'matchautocadvariables :vlax-true)
    )
  )
)
(jmm-resetunits)
;;

Message 28 of 28
pmascaro
in reply to: pmascaro

Hey Jeff,

 

I hope all is well!!

 

It looks like we still have some drawings set to inches floating around my company...

 

I'm having problems running this lisp in the latest version of C3D (It runs, but nothing happens...). I looked into it a bit and I found a command that would alter the embeded untis even if you're not running C3D. -DwgUnits and/or -AECDwgUnits. (I think they are the same command, not sure)

 

Is there any chance this can be re-writen to fix the -DwgUnits in (R) 2014  (19.1)?

 

Thanks!

Paul

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report