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: 

Inserting points on specific layer

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
718 Views, 4 Replies

Inserting points on specific layer

Hi,

 

I have made an add-in that automates the insertion of points on a surface and I am trying to find out how to put these points on a specific layer. I guess that changing the "standard" default Point style would do the trick, but I can't find the objects to use in the Civil3D API.

 

Any suggestions?

 

Civil3D 2012

VS 2010, VB or C#

4 REPLIES 4
Message 2 of 5
Jeff_M
in reply to: Anonymous

How are you creating the points? If you have a C3D Point object, just assign it the layer directly when created.

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

I am using a csv file with the ImportPoints function. The format is PENZD. It works fine on 64bit (not on 32)

 

The AeccPointImportOptions only reflects what is in the application and Insert > Points from File.

By the way, the option

 

.PointDuplicateResolution = AeccPointDuplicateResolutionType.aeccPointDuplicateOverwrite

 

does not work. A dialog is still shown.

 

Sometimes the layer is already there sometimes I have to create it.

 

Maybe I should try to create a Description Key Set at Runtime and use its Code property as the D in the csv file?

 

The problem is that I can't figure out how to do it and if it is the right approach in C3D.

(My first app in this context, most of my projects are for Map, Mechanical or Inventor.)

 

 

 

Message 4 of 5
Jeff_M
in reply to: Anonymous


@Anonymous wrote:

I am using a csv file with the ImportPoints function. The format is PENZD. It works fine on 64bit (not on 32)

 

The AeccPointImportOptions only reflects what is in the application and Insert > Points from File.

By the way, the option

 

.PointDuplicateResolution = AeccPointDuplicateResolutionType.aeccPointDuplicateOverwrite

 

does not work. A dialog is still shown.

 

Sometimes the layer is already there sometimes I have to create it.

 

Maybe I should try to create a Description Key Set at Runtime and use its Code property as the D in the csv file?

 

The problem is that I can't figure out how to do it and if it is the right approach in C3D.

(My first app in this context, most of my projects are for Map, Mechanical or Inventor.)

 

 

 


This could probably work well, just use a description of * to apply to all the points. You can create a temporary DescriptionKeySet, add one Key specifying the layer, then delete the Set once done.

 

Get the DescriptionKeySets collection, add a new Set, add a key to the set. Although I'm not sure if you can specify the order for multiple DKSets.

 

Another option would be to create a temporary point group and set the importoptions to use that group. You could then loop through the points to set the layer in the group after the import completes.

 

Actually, it sounds like you want all of the points to go on a specific layer? If so, check for the existence of that layer, create it if needed, set that layer as the current layer before the import process, after the import set the current layer back to what it was.

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

Thank you very much for your suggestions. They make sense.

The project is on hold for a few days but I will give these a try some other time and will post my results.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report