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

Mapimport4 2012 Civil3D

14 REPLIES 14
Reply
Message 1 of 15
jregier
407 Views, 14 Replies

Mapimport4 2012 Civil3D

Recently upgraded from 2010 to 2012 and mapimport4 command is missing shp file format import option.  We have lisp routines that format shp files to CAD underlay drawings.  Please advise patch or other command line options.

Thank-you

14 REPLIES 14
Message 2 of 15
antoniovinci
in reply to: jregier

What for Mapimport4, when you have the richer _MAPIMPORT, sir?

Message 3 of 15

Hi,

 

>> What for Mapimport4, when you have the richer _MAPIMPORT, sir?

Because it's the only type of import, that creates the lables for each polygon as points (real inside of the polygon) and the object-data is placed on these points and not on the outline.

And if you want to create a MAP-topology starting with polygonal-shape data MAPIMPORT4 is the only way to do that errorfree.

 

- alfred -

 

BTW: I wrote that to Autodesk in the time of beta-testing, but was just ignored.

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 15


alfred.neswadba wrote:

it's the only type of import, that creates the lables for each polygon as points (real inside of the polygon) and the object-data is placed on these points and not on the outline


Danke, but the same identical effect you get with _MAPIMPORT before and _MAPCREATECENTROIDS after...

Even better, 'cause the OD stay both on the outline and on the inner point.

I humbly guess these 2 commands are really redundant, my dear...

Message 5 of 15

Hi,

 

>> but the same identical effect you get with _MAPIMPORT before and _MAPCREATECENTROIDS after...

Sorry to say, but absolutely wrong as the MAPCREATECENTROIDS has not learned the existance of islands.

 

Try to run the command in such a situation:

 

 

You get both centroids in the same inner polygon. when you now (try to) create a topology you get:

  • no centroid in the outer polygon
  • double centroids in the inner polygon

And that is the situation where you now have to manually correct the centroids ... for may be thousands or millions of polygons ... good luck. 😞

 

It seems that Autodesk does always forget that GIS-data can hold islands

An example is this: >>>another bug<<< Map3D has (had) with FDO-objects and FDO-command for union of two polygons, but here it is solved with 2013 (great). Anyway frustrating is that it needed 3 versions and I don't know how many servicepacks in the meantime to get repaired. At least there were 3 years of wrong datacreation (data-damage).

For MAPCREATECENTROIDS this bug exists as long as the command exists. As long as the MAPIMPORT4 existed for SHP there was a workaround to come from a polygonal shape to a topology ==> and now (2012 and 2013) .... this workaround is cut. 😞

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 15


alfred.neswadba wrote:

It seems that Autodesk does always forget that GIS-data can hold islands


I don't concur with you, sorry: in my glorious Map2006 everything works as expected, so I cannot believe that newer releases fail.

Here's my workflow since years:

1] when you create a topology, Map is clever enough to "feel" the presence of islands

2] at the moment of _MAPEXPORT as a shapefile, you must set the interface like this, and at the moment of _MAPIMPORT of the shapefile, you must set the interface like this

3] finally you issue _MAPCREATECENTROIDS, getting only one centroid in the right asymmetrical position: check this out.

Message 7 of 15

Hi,

 

At short:

 

  • agree to 1
  • agree to 2 (well, agree partially, normally I don't use grouping when exporting a Topology as it just creates multiple objects, anyway, it does not matter for this problem as I have to import any shape I get and not just the ones I create)
  • don't agree to 3 ... as your island is not around the mathematical centroid of the outer polygon you don't see the problem. Place your star-polygon really into the center of the outer rectangle (or create a rectangle, make a offset to the inside) and then start _MAPCREATECENTROID ==> 2 points in the inner poly

 

In a few minutes you will get a SHP and a video that makes it clear how it (not) works for me.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 15

Hi,

 

Take then my shape attached, import it with MAPIMPORT and then start _MAPCREATECENTROIDS. Look also to my video, that shows how the import runs with MAPIMPORT4 and the one with MAPIMPORT and MAPCREATECENTROIDS.

 

- alfred -

 

Great to have a discussion with you 😉 🙂

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 9 of 15


alfred.neswadba wrote:

Great to have a discussion with you


Me too, mein Herr...

I was able to replicate your bug, getting 2 centroids, and here's my humble debug: you should _MAPEXPORT exactly like this.

Doing so (with the settings # 1,2,3 as above) you can _MAPCREATECENTROIDS only one centroid.

Message 10 of 15

Hi,

 

>> you should _MAPEXPORT exactly like this.

Oh man, no, not MAPEXPORT ... when using MAPIMPORT I should not check the option (for creating closed polylines)

I always checked the option as I disliked MPOLYGON as object not really usefull ....

BUT:.....then I get MPOLYGONS instead of polylines

AND:.... what is new to me is that the command _MAPCREATECENTROIDS can work with these MPOLYGON-objects and yes, in case of MPOLYGONs the creation of the centroids runs fine!

 

After that the MPOLYGONSs can be exploded, can be MAPCLEANed and after all the creation of a new topology is ok without manual work.

 

Well, I have to stop my "hating MPOLYGON"-opinion (starting tomorrow or so ... 😉 )

 

Again, great discussion, thank you a lot for that 🙂 and at least yes, now I also don't see any more necessarity of MAPIMPORT4 for SHP.

 

THX! - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 11 of 15
jregier
in reply to: Alfred.NESWADBA

Thank-you all for response... My problem is automation with lisp - MAPIMPORT4 works through the command line - MAPIMPORT does not, it brings up a dialog box that stops the routine. The lisp routines I developed way back open the shp, extract with OD data, pulls the OD data from the entities, shades, and relayers imported objects from 20 or so shape files pulled from base map file sites. It was all automated, and I'm trying to get that back. Jim
Message 12 of 15
Alfred.NESWADBA
in reply to: jregier

Hi,

 

maybe using the import-option-file (*.IPF) could be a help? Look >>>here<<<

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 13 of 15
jregier
in reply to: Alfred.NESWADBA

Alfred I think that'll work, (command "-MAPIMPORT" "SHP" shpfilename "Y" shpimportfile "P") thank-you.
Message 14 of 15
Alfred.NESWADBA
in reply to: jregier

Hi,

 

does that work for you? I did some samples like you suggested, at least with Civil3D2013 that did not work (even having FILEDIA set to 0).

But if it's working for you, then everything is ok for today 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 15 of 15
jregier
in reply to: Alfred.NESWADBA

Alfred It was hit and miss but it seems if the input is all valid it rolls through without the dialog box coming up - makes it hard to troubleshoot the command line options but with the imp file that's not as critical and gives me more custom options saving some internal programming. Have to rewrite anyway. It's incredibly frustrating, in this case the MAPIMPORT4 command still works, they've just removed the shp format as one of the supported files - so dgn files still work. It's to the point I dread upgrading. The MS jet4 removal is another huge hit to productivity - I'll be working on that animal next week. I do have cmddia set to 0, and expert set to 2.

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

Post to forums  

Autodesk Design & Make Report

”Boost