Programatically creating multiple surfaces

Programatically creating multiple surfaces

Anonymous
Not applicable
1,285 Views
4 Replies
Message 1 of 5

Programatically creating multiple surfaces

Anonymous
Not applicable

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?

0 Likes
Accepted solutions (1)
1,286 Views
4 Replies
Replies (4)
Message 2 of 5

Jeff_M
Consultant
Consultant
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
0 Likes
Message 3 of 5

Anonymous
Not applicable

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. 

0 Likes
Message 4 of 5

Jeff_M
Consultant
Consultant
Accepted solution

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
0 Likes
Message 5 of 5

Anonymous
Not applicable

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

0 Likes