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

Programatically creating multiple surfaces

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
daryl
686 Views, 4 Replies

Programatically creating multiple surfaces

The Problem

 

We programmatically create surfaces in Civil 3D 2014. The problem is they are residing on layer 0. When importing into 3DS Max, all the surfaces TINs are on layer 0, which we want them to reside on the assigned layer.Also, I am using cut and pate surfaces programatically. The initial surface is on layer 0 (Standard Style).

 

Here is the example of the 3DSMax file where the TIN is on layer 0. The goal is to have each TIN on the assigned layer.

 

A few more details.

 

The Overall surface is Layer 0 (Standard Style)--(Named "All")

Our custom pasted surfaces all have assigned layers for the objects

 

The Goal

 

I am trying to figure out the workflow that is causing the layers(TIN objects specifically) not to import on the assigned layer.

 

Files

 

2 3DSMax file and 1 Civil 3D 2014 file.

 

Any Ideas?

Geospatial Application Development
Banks and Banks Consulting
4 REPLIES 4
Message 2 of 5
Jeff_M
in reply to: daryl

If you are importing the All surface into 3dSMAX then the TIN will be on layer 0. Importing of each of the surfaces individually should place them on their own layers. I don't have 3DS to look at that file.
Jeff_M, also a frequent Swamper
EESignature
Message 3 of 5
daryl
in reply to: Jeff_M

After searching the import methodology into 3DSMax, I am not able to use the extract objects from Civil for performance reasons. So, I need to tackle the layer 0 situation on the Civil side. If you create a surface manually, there is a setting for the object's base layer to be set on creation. I do not know if this property is exposed in the API. This should solve the problem, if there is access. 

Geospatial Application Development
Banks and Banks Consulting
Message 4 of 5
Jeff_M
in reply to: daryl

Surfaces do inherit the Layer property from the Entity object, so the layer can be set to whatever you need by specifying the Layer Name.

 

surf.Layer = "C-Surf-Layer"

Jeff_M, also a frequent Swamper
EESignature
Message 5 of 5
daryl
in reply to: Jeff_M

Perfect! I had to backup a bit. I searched the object browser for under TINSurfaces and the layer setter was not readily visible, and to muddy things up a bit, there was a custom surface class that I actually searched the wrong object tree. Thanks! LOL

Geospatial Application Development
Banks and Banks Consulting

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

Post to forums  

Rail Community


Autodesk Design & Make Report