.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Insert point/line/... features programatically .net

5 REPLIES 5
Reply
Message 1 of 6
betak
787 Views, 5 Replies

Insert point/line/... features programatically .net

I would like to insert new feature by clicking button, each button (e.g. hydrant) correspond to predefined layer and predefined type (point, line, ...)  so users do not need to right click on specific layer and choose geometry type (in display manager). Only input required is to place element.

I tried to call new feature from menu, but then always come dialog to choose layer ;( This I would like to avoid as there are many layers, and elements could be placed only on small subset of them.



5 REPLIES 5
Message 2 of 6
norman.yuan
in reply to: betak

So, you are talking about inserting map feature class object into given map layer in Acad Map.

 

I assumie you use Acad Map 2009 or later. In this case, you need to use AutoCAD Map Platform APIs to do what you want programmatically. Platform API for Acad Map was available officially from Acad Map2009 (Map 2008 comes preview version of Platform API).

 

You may want to visit Acad Map forums, where a forum is dedicated to Acad Map API development (but it is far less active as this forum, though).

 

You may also want to download Acad Map ObjectARX SDK (not the same as plain AutoCAD ObjectAXR SDK), which includes Platform API documentation and some sample code.

 

Good luck on your exploration of AcadMap programming.

 

 

 

Message 3 of 6
betak
in reply to: norman.yuan

I use autocad map 2011, have pass through sdk as well, but haven't found anything simimlar, or any idea how to solve it. Therefore post here

Message 4 of 6
norman.yuan
in reply to: betak

There are "sdk.geo.dev.chm/pdf" and "sdk.samples.chm/pdf" in the Map ObjectARX SDK documens that you can look up. There is also a a "Platform" folder underneath Map Samples folder that includex 17 sample C# projects you can play with.

 

I have to admit that it takes time to go through the sample project to understand how to use Platform APIs, but that is all you need to get started.

Message 5 of 6
norman.yuan
in reply to: betak

More specifically, you can just explore the Platform.Samples.Util project and the BuildMap project. The former provides almost all the tools you need to connect to FDO source, create Feature definition, create Layer definition and ... the latter shows you how to get data from FDO source and show the data in drawing on map layers.

 

You explore these 2 projects in conjunction with the corresponding couments I mentioned in previous reply.

 

 

Message 6 of 6
Alexandra34
in reply to: betak

hi 

 

I seek a example to create a point and a line in fdo with vb.net or other language?

 

(command "_CreateNewFeatureCommand" "ID_CMD_DM_GIS_CREATE_NEW_POINT" ...

 

can you me help ?

thank you

alex

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost