Object Data Mapping to object properties during Mapimport of an .SHP file

Object Data Mapping to object properties during Mapimport of an .SHP file

nano_langenheim
Advocate Advocate
1,568 Views
8 Replies
Message 1 of 9

Object Data Mapping to object properties during Mapimport of an .SHP file

nano_langenheim
Advocate
Advocate

Hi

I have a point file with 3 attributes, (Canopy_X_M, Canopy_Y_M and Height_M). I would like to map these attributes to the properties of a simple block I have made as a replacement for the points  (its Scale X, Scale Y and Scale Z properties) but if I try to edit the Object Data Mapping - I don't seem to be able to edit the Target Fields - I'm using Civil 2023. I feel like I used to be able to do it in a previous version of Civil? If I can no longer do this during the import - does anyone know how to / the command to access the Data Map after the import?

nanolangenheim_0-1689421248135.png

 

N-particle
0 Likes
Accepted solutions (1)
1,569 Views
8 Replies
Replies (8)
Message 2 of 9

ChicagoLooper
Mentor
Mentor

Hi @nano_langenheim 

I'm not sure I know what you're trying to do so correct me I misunderstand, you are trying to make your block's PROPERTIES comply with the object data you acquire during MAPIMPORT procedure.

 

MAPIMPORT command:

You CAN map the object data-to-attributes of your block.

You CANNOT map the object data-to-properties of your block and by properties I mean the X, Y, Z (scale and elevation) of your block.

 

Block attributes are tags or labels you add to a block. As you reuse the block, you can customize the tag for each individual instance of the block. While the block stays the same, the tag can change.

 

The scale and height (size and elevation respectively) of imported data cannot be MAPPED just by only using the MapImport procedure. You need to perform a query after the mapimport.

 

When you perform this type of query, you'll also need to combine the function, which is appropriately named, ALTER PROPERTIES. Refer to image with button named Alter Properties.

 

201.PNG

 

Explaining the Alter Properties procedure is a little difficult without actual data and the real-deal block. If you provide more info, or better yet upload your block and data with a description of the final work, then a step-by-step procedure can be provided.

 

Chicagolooper

EESignature

Message 3 of 9

nano_langenheim
Advocate
Advocate
Excellent!
You have understood my problem perfectly. Currently:
I make a Civil file (georeferenced to match that of the ArcGIS .SHP file) using the Map import command, swapping points for a simple cross with no tags or attributes assigned and bringing in OD.
I save and close that drawing.
I open a new georeferenced file, open the MAPWSPACE (and attach the drawing created in the previous step).
I attempt to build a query that alters the block properties (draws new blocks in the new file with altered properties) – but I cannot write that function correctly (either because my block doesn’t have the properties needed OR because I really don’t know how to write the query properly). Scaling is globally applied (i.e. I cannot separate out X,Y, Z scaling).
My final objective: To take those scaled blocks into 3Ds Max – as a reference object (which can read the required X,Y,Z modifications) – i.e. The modified blocks will ‘inform’ the scale requirements of model trees.

Example data set is attached. Many thanks for your help!

N-particle
0 Likes
Message 4 of 9

Pointdump
Consultant
Consultant

Hi N-particle,
I don't see any attached data.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 5 of 9

nano_langenheim
Advocate
Advocate

Apologies - @Pointdump and @ChicagoLooper 

I don't think 7Zip files are accepted. Trying again with a WinZip.

N-particle
0 Likes
Message 6 of 9

Pointdump
Consultant
Consultant

N-particle,
Thanks for posting your data.
"Scaling is globally applied (i.e. I cannot separate out X,Y, Z scaling)."
Yup, I can't either.
Dave

 

Scale_1.png

 

Scale_2.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 7 of 9

ChicagoLooper
Mentor
Mentor
Accepted solution

Hi @nano_langenheim 

Thank you for sharing your data. Stony Creek, correct?

This exercise took longer than I had anticipated. It's easy to do in other GIS-essy programs but if you want to use AutoCAD exclusively, it'll take a while because you must perform several operations in order to get the final results. 

 

Steps include:

  1. Add shapefile to drawing=>create a CALCULATION by opening the shapefile's Table View=>name the calc CANOPY_SPR use expression CANOPYRADM x 2 (to get canopy diameter or the spread of the branches).
  2. Create a brand new shapefile: Use existing 250Tree Test.shp=>Bulk Copy to create (by copying) a new shapefile (bulk copy is used so the new Calculation from Step #1 can be added to new shapefile's dbf). <<The Bulk Copy procedure is a new POST unto itself. I won't (and shouldn't) explain it here. Other programs may add a new calculation (or rename an existing attribute) to the database file much easier and more efficiently but using only Autodesk products requires use of Bulk Copy,. In 'other' programs=>right click attribute name (the column header) while in Table View=>Rename=>enter New Name=>done. Autocad cannot do this right click jazz, so must resort to bulk copy. Major bummer!>>
  3. Create a block (such as a circle to represent plan view of tree canopy). OK to delete this block after creation since all you need is the block's 'definition' to be part of the dwg, not the actual block itself.
  4. In same drawing as Step #3, use MapImport to do lots of stuff: Separate by Layer=>create Object Data=>Insert the newly created block (instead of a the default 'Point'). Save this drawing in project folder. Name it SETUP_RAD-CONV-DIAM.dwg which is the drawing that you'll query. It's the same one which used the radius to calculate (convert) Rad to Diam. (WARNING: You'll need diameter, otherwise plan view of the trees won't be accurate b/c the size will be radius not diameter.)
  5. Perform a QUERY: Location=>All (doing this will 'capture' ALL objects from the Setup drawing). While still in the same QUERY, Alter Properties=Scale (from the calculation that was copied in step #2 which is the diameter of the canopy) and Elevation=>HEIGHT_M (this will be the z-value given to the block.) Since the block is sized as Diameter=1.0, using the attribute CANOPY_SPR during  Alter Properties creates an accurately sized block.

 

Hopefully, this is what you want. (Refer to images below.)

Image-1. A block to represent plan view of tree canopy.Image-1. A block to represent plan view of tree canopy.

 

Image-2. Tree diameter = tree radius X 2. Layers are based on NL_Categor, and X/Y positions taken from 250Tree Test shapefile.Image-2. Tree diameter = tree radius X 2. Layers are based on NL_Categor, and X/Y positions taken from 250Tree Test shapefile.

 

Image-3. Closeup showing dimensions of tree radius and tree diameter.Image-3. Closeup showing dimensions of tree radius and tree diameter.

 

Image-4. Using viewcube, switching to the front view clearly displays the block's elevation.sImage-4. Using viewcube, switching to the front view clearly displays the block's elevation.s

 

Whew! The End.

 

Chicagolooper

EESignature

Message 8 of 9

nano_langenheim
Advocate
Advocate

Wonderful and yes Stoney Creek!- @ChicagoLooper and @Pointdump, thank you for the checking and workflows. I will work through the above today and see if putting the Z value into the elevation field gives me the Z value work around needed. 

In terms of feed back to Autodesk - would you think it worth feeding back to the Autodesk Infrastructures Group - these (major bummers, and inabilities to split x,y,z scale values?).

Many thanks again for your responses - I will report back when  I'm through the other side of the workflow!

N-particle
Message 9 of 9

nano_langenheim
Advocate
Advocate

Thank you both. Using elevation for the Z scale worked (with a little scripting in 3Ds Max). To avoid complexity, I went back to the GIS file and re-output with a diameter field before MapImport. Now just have to work out how to word as a submission to Autodesk to see if we can get separate X,YZ scales informed by different attribute columns!

 

N-particle
0 Likes