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: 

C3D-COORDINATE SYSTEM SETTING LISP

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
CADEngr2014
1532 Views, 15 Replies

C3D-COORDINATE SYSTEM SETTING LISP

Hello,

 

I am using Civil 3D 2014.

 

I am looking for a lisp routine or program that can set a files coordinate system without having to open the file, if its even possible. 

 

Thanks in advance for any suggestions.

15 REPLIES 15
Message 2 of 16
Pointdump
in reply to: CADEngr2014

CE,

 

Corpscon looks promising. I'm still trying to figure out how it works. Several people on this Forum have praised it.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 3 of 16
rkmcswain
in reply to: CADEngr2014

set the coordinate system in what kind of file, a C3D .DWG file?

 

I suspect it's possible using something like this: http://www.lee-mac.com/odbxbase.html

R.K. McSwain     | CADpanacea | on twitter
Message 4 of 16
CADEngr2014
in reply to: rkmcswain

Yes, a Civil 3D (2014) drawing file.

Message 5 of 16
odoshi
in reply to: CADEngr2014

You can batch drawings by opening them in memory with the .NET API. I'll take a look this AM.

Mike
Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
Message 6 of 16
AllenJessup
in reply to: Pointdump

Dave,

 

Corpscon works on external point files like a PNEZD.csv. It doesn't work directly on drawings. I think it's great because it's fast, easy to use and does vertical transformations. Plus it's Free!.

 

Allen

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 7 of 16
Pointdump
in reply to: AllenJessup

Allen,

 

I downloaded it after your glowing recommendation in another post. I opened it, but it's not intuitive. I'm going to read the PDF "manual" today. It does look promising.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 8 of 16
CADEngr2014
in reply to: AllenJessup

Dave,

 

I have used Corpscon for individual csv translation but do not believe it can set the coordinates of a dwg file.  All I need to do is toggle the coordinates of a drawing file to a coordinate system without having to open the file.  I have several files and was looking for a quick way to accomplish setting their coordinate systems.

Message 9 of 16
odoshi
in reply to: CADEngr2014

So, I looked into the AutoCAD Map API for setting Coordinate systems on a batch of drawings. It looks like the script would have to open each drawing to set it.

 

There is also a method in Civil 3D's API as well, and again would require opening the drawings to access the CivilDocument's Settings object.

 

If you don't have too many drawings to update, performance shouldn't be that bad, but getting the script to wait for the drawing to completely open before processing is a hassle sometimes.

 

Usually for batching drawing, I like AutoCAD's ReadDwgFile method, which opens the drawing in memory and lets you iterate the block tables. But that's not where the zones are stored.....

 

If it's something you'd like to go through with, you can PM or email me.

 

Regards,

Mike

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
Message 10 of 16
rkmcswain
in reply to: rkmcswain

set the coordinate system in what kind of file, a C3D .DWG file?

 

I suspect it's possible using something like this: http://www.lee-mac.com/odbxbase.html

Maybe @BlackBox_  could comment on this....

R.K. McSwain     | CADpanacea | on twitter
Message 11 of 16
CADEngr2014
in reply to: odoshi

Odoshi,

 

Thank you for that insight.  It sounds like it is the same: if I open the file manually or write an application to open the drawing in order to access the coordinate settings.  So a batch process to update a drawing file's coordinates without opening the file is not an option.  Is my understanding correct?

Message 12 of 16
AllenJessup
in reply to: CADEngr2014

This looks like it might be useful. I haven't done anything like this in a long time. Back in the day we'd use a batch file to open the drawing, call a script that would run a lisp. Thing have changed since then.

 

BatchInDatabase

 

Allen

 

 

 

 

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 13 of 16
BlackBox_
in reply to: rkmcswain


@rkmcswain wrote:

@rkmcswain wrote:

set the coordinate system in what kind of file, a C3D .DWG file?

 

I suspect it's possible using something like this: http://www.lee-mac.com/odbxbase.html


 

Maybe @BlackBox_  could comment on this....


*Tips hat*

 

Since this feature has been exposed to .NET API as Partha demonstrates here, I should think this could be implemented in a batch processing operation using ReadDwgFile Method (untested), or even ported down into a custom LispFunction Method to expose .NET functionality to LISP API directly (example here, unrelated to this thread).

 

HTH



"How we think determines what we do, and what we do determines what we get."

Message 14 of 16
Jeff_M
in reply to: BlackBox_

@odoshi  @BlackBox_ 

If either of you decide to test this, be warned that there was a bug when using ObjectDBX or the .NET ReadDwgFile() with Civil3D drawings containing line/curve Tag labels and Tables. When these drawings are opened & saved in either manner the tables lose the links to the tags, so all tables end up empty. I last checked this at the initial release of 2014, so it may be corrected in 2015. However, since I first reported this in C3D2008, and it hadn't been corrected as of the 2014 release, I'm going to guess it wasn't at the top of the list of things to fix.

Jeff_M, also a frequent Swamper
EESignature
Message 15 of 16
BlackBox_
in reply to: Jeff_M


@Jeff_M wrote:

@odoshi  @BlackBox_ 

If either of you decide to test this, be warned that there was a bug when using ObjectDBX or the .NET ReadDwgFile() with Civil3D drawings containing line/curve Tag labels and Tables. When these drawings are opened & saved in either manner the tables lose the links to the tags, so all tables end up empty. I last checked this at the initial release of 2014, so it may be corrected in 2015. However, since I first reported this in C3D2008, and it hadn't been corrected as of the 2014 release, I'm going to guess it wasn't at the top of the list of things to fix.


As always, thanks for the sound input, Jeff.

 

Whilst not as efficient as .NET batch process, nor ObjectDBX via LISP, perhaps then it would be more secure to instead simply implement the LispFunction Method and call via Script with the C3D drawing actually open in the editor. 



"How we think determines what we do, and what we do determines what we get."

Message 16 of 16
rkmcswain
in reply to: Jeff_M

Jeff_M wrote:

..... When these drawings are opened & saved in either manner the tables lose the links to the tags, so all tables end up empty. I last checked this at the initial release of 2014, so it may be corrected in 2015. However, since I first reported this in C3D2008, and it hadn't been corrected as of the 2014 release....

Wow. I would hate to be a developer who relied on the API. Thanks for sharing.

 

R.K. McSwain     | CADpanacea | on twitter

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report