Importing points through .net api with predefined steps.

Importing points through .net api with predefined steps.

iqbalzain099
Contributor Contributor
766 Views
4 Replies
Message 1 of 5

Importing points through .net api with predefined steps.

iqbalzain099
Contributor
Contributor

I wish to automate importing points in a specific manner through .NET API with all requirements presented as questions to the user, the manual way is given below:

 

1. OPEN YOUR LAYOUT, MOVE TO MODEL SPACE, IN THE TOP RIBBON CLICK INSERT> POINTS FROM FILE
2. IMPORT POINTS DIALOG BOX WILL OPEN.
3. SELECT POINT FILE FORMAT, SCROLL TO THE BOTTOM AND SELECT PNEZD (COMMA DELIMITED)
14. CLICK GREEN + SYMBOL AND NAVIGATE TO THE "TEXTFILE" .TXT FILE. VERIFY A GREEN CHECK BOX IS NEXT TO FILE. IF A RED X IS PRESENT, RETRY.
15. RESELECT FILE FORMAT: PNEZD (SPACE DELIMITED)
16. CLICK "OK".
17. COGO POINTS WILL APPEAR IN THE LAYOUT.

0 Likes
767 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor

The workflow you described is basically what the built-in command "IMPORTPOINTS" does. So, I am not sure what you really ask here: do you want to write code with Acad/C3D .NET API to mimic the "IMPORTPOINT" command with the same or very similar UI, if so, why? just practice the API programming, or you want to somehow improve/simplify the "IMPORTPOINTS" command for your custom workflow (I can hardly see what the difference of workflow is, from your description)? Or, maybe, you just want to know if it is doable with .NET API, if so, yes, it can be done rather easily, if you do know how to program with Acad/C3D .NET API.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

iqbalzain099
Contributor
Contributor

The main thing I'm trying to achieve here is the automation aspect of it, instead of opening the dialog box, I wish it all to be done on the command line itself, mainly doing the above steps by just asking the user the necessary requirements. This filters into a greater code, but as of now, I've already achieved, with just running one command an entire procedure of slope analysis along with exporting points while attaching elevations to them, exporting them to an excel file with a certain format. I wish to add to this procedure by importing filtered points into the drawing.

0 Likes
Message 4 of 5

essam-salah
Advisor
Advisor

hi @norman.yuan 


@norman.yuan wrote:

 do you want to write code with Acad/C3D .NET API to mimic the "IMPORTPOINT" command with the same or very similar UI, if so, why? just practice the API programming, or you want to somehow improve/simplify the "IMPORTPOINTS" command for your custom workflow (I can hardly see what the difference of workflow is, from your description)? Or, maybe, you just want to know if it is doable with .NET API, if so, yes, it can be done rather easily, if you do know how to program with Acad/C3D .NET API.


maybe he has a lot of files and wanted to import em all at once

0 Likes
Message 5 of 5

essam-salah
Advisor
Advisor

hi @iqbalzain099 

 

try snippets from ADSD help  Autodesk Civil 3D Help | Points | Autodesk 

 

also tbh first thing came to my mind when describing the GUI process is UiPath and RPA.

 

 

0 Likes