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: 

Export polygon with hole to shape file

12 REPLIES 12
Reply
Message 1 of 13
Maypo
3453 Views, 12 Replies

Export polygon with hole to shape file

I have a polygon with a hole in it. I want to export this exterior polygon to a shapefile. I want the shape file to display as a "donut" if you get my meaning.
The shape keeps coming in completely hatched ignoring the island within. Is there a way to do this with the 2008 software?
12 REPLIES 12
Message 2 of 13
auroramatt
in reply to: Maypo

Is it an mpolygon or polyline? If it's a polyline then first select the polyline and push the New Feature from Geography button. Make sure the polygon feature is checked out and right click > edit feature. From there select add and trace the inner polygon. I'm not sure what you mean when you are talking about hatching. If you are importing polygon shapefiles and checking the box to convert to polylines then you will lose your ability to have the donut that you want. One reason I hate polylines. A line is not a polygon and hatch's are a pain. Can't say that the mpolygon is great either because they are harder to edit.
Message 3 of 13
etread
in reply to: Maypo

I would go with the MPOLYGON command, I have used it with no trouble.
Message 4 of 13
gcetken
in reply to: Maypo

I used mpolygon but by doing that I lose data attached to the object? Any ideas?
Message 5 of 13
JohnPM
in reply to: Maypo

If you had created your mpolygon from two closed polylines by first selcting the center polyline there should be no issue with exporting with an island. Here is the command line of what I am referring to when creating polygons with islands for export.

Command: mpolygon

Specify start point or [Fill/Select objects/eXit]
Message 6 of 13
gcetken
in reply to: Maypo

Thanks John, I can do the island polygons, but my concern was mostly about the data. The closed polyline has object data attached to it. When I convert it to mpolygon, there is no more data. I couldn't find anything about that subject too.
Message 7 of 13
JohnPM
in reply to: Maypo

I see the same thing, when the polyline is converted to Mpolygon the object data is deleted. I was able to go back and re-attach the object data to the polygon after conversion and export as shp. Fortunately the object data table still existed but just not attached.
The polygon shp came in with the center island and the object data.

John
Message 8 of 13
gcetken
in reply to: Maypo

John how did you reattach the previous data to it? I was able to attach the object to it, but had to reenter the data.
Thanks for all the help.
Message 9 of 13
JohnPM
in reply to: Maypo

I had to pass the data in the polyline to a centroid but still had to manually retrieve it. I am not aware of an automated way around this yet when it seems there should be a better solution. I will continue to look.

John
Message 10 of 13
Jfactory
in reply to: Maypo

I hope it's okay to bump an old thread if I have something new to suggest. I made a pizza (sticking with the food theme here) then:

 

I clicked on Split Feature ('mapfeaturesplit')

Command: _mapfeaturesplit
Select one or more linear or polygonal features to split:1 found
Select one or more linear or polygonal features to split:
There are 1 checked-out features selected for split.
Create new or multi-part [New/Multipart]<New>:n
Generate new feature ID or use existing [New/Existing]<New>:n
Would you like to Draw or Select the line for split? [Draw/Select] <Draw>
Specify start point:

 

Then I traced around the donut hole I prepared earlier.

 

It makes a new feature in the middle of the pizza. Then I selected that feature and deleted it and voila, a donut!

 

 

Tags (3)
Message 11 of 13
antoniovinci
in reply to: Jfactory

Well, I missed this topic, but here's a classic way without juggling.

If you wanna get a donut shape with embedded OD, the magic answer is: "topology".

Message 12 of 13
shyamjeeme
in reply to: auroramatt

I wanna to select more than a polyline at a time for update their xdata by autolisp. I am able to do it one by one but it is lengthy and time consuming.

Message 13 of 13
scheel
in reply to: shyamjeeme

Hi,

 

Look at this link https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/file...

 

There you will find the description of the ssget-function to select more than one entity.

When you use the filter option you can select only ploylines. But be carefull, there are more then one objecttype for polylines (POLYLINE and LWPOLYLINE).

 

(ssget "_W" '((-4 . "<OR") (0 . "POLYLINE") (0 . "POLYLINE") (-4 . "OR>")))

 

For Filter lists you find more explanation under the following links:

 

https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/AutoCAD-AutoLISP/file...

 

http://help.autodesk.com/view/ACD/2017/ENU/?guid=GUID-5CB54129-22A1-42B9-B97C-2D2F5597F90E

 

Thorsten

Thorsten Scheel
Contelos GmbH













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

Post to forums  

Autodesk Design & Make Report

”Boost