How To Scale Symbols from a Shapefile?

How To Scale Symbols from a Shapefile?

Cadguru42
Advisor Advisor
1,421 Views
17 Replies
Message 1 of 18

How To Scale Symbols from a Shapefile?

Cadguru42
Advisor
Advisor

I'm asking here even though this might end up being done with Map 3d. I've got a shapefile of tree data that includes a field for size and common name. I need to have blocks scaled based on the size field, three types of blocks used based on common name, and have a label for each tree that says XX" TREE that uses the size field data. 

 

This seemed simple until I needed to get the blocks/symbols scaled based on a field. I tried using the Task Pane of Map 3D to do this and it worked for everything but scaling the symbol for the shapefile. Doesn't seem to be possible to have an expression for the size of the symbol in the Display Manager.

 

I then tried using MAPIMPORT to bring the shapefile with data, but there doesn't seem to be a way to scale the block based on object data. 

 

Next on the list is to try using C3D COGO points, custom point format, and parameters to get it scaled. But that requires using a CSV and I don't see how to export the northing & easting with the rest of the shapefile data. 

 

I'm currently looking to see if Dynamo can be used to manipulate the blocks with object data if the shapefile is brought in using MAPIMPORT.

 

Does anyone know of a quick/easy way to do this that I'm missing? 

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
1,422 Views
17 Replies
Replies (17)
Message 2 of 18

AdammReilly
Collaborator
Collaborator

I was able to do this using an intermediary file.

Map Import all your data into said intermediary file, then query that data into your target file. In the query, you can set the properties to alter.

AdammReilly_0-1771271792187.pngAdammReilly_0-1771271792187.png

This is just a sample from one of my generic files, but it shows where to make the change and what you can use. If you have object data, you'll have that option in the Property Alteration Expression dialog too.

 

Adam Reilly
Civil 3D 2026
Creator A16 AI+ A3HVFG
Windows 11 Pro
AMD Ryzen AI 9 365 w/ Radeon 880M
LinkedIn
Group Leader badge
Austin CADD User Group
LinkedIn | Discord
Civil 3D Certified Professional
0 Likes
Message 3 of 18

Cadguru42
Advisor
Advisor

I'll try that. Here's a fun fact I've already run into. This project is on ACC. And Map 3D doesn't support ACC. I can't add an ACC folder as a Drive Alias in order to attach the intermediary drawing. Considering how much Autodesk only focuses on ACC, I'm surprised by this. Then again, Map 3d has been in maintenance mode for almost 20 years with no new features.

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 4 of 18

AdammReilly
Collaborator
Collaborator

You could add the local folder of the ACC path ("C:\Users\username\DC\ACCDocs\CompanyHub\ProjectName\Project Files\Folder\to\GIS\Data") and that *should* work.

I use a similar method for adding autocad settings to my profile and hosting the data in ACC.

Adam Reilly
Civil 3D 2026
Creator A16 AI+ A3HVFG
Windows 11 Pro
AMD Ryzen AI 9 365 w/ Radeon 880M
LinkedIn
Group Leader badge
Austin CADD User Group
LinkedIn | Discord
Civil 3D Certified Professional
Message 5 of 18

Pointdump
Consultant
Consultant

Hi @Cadguru42,
@O_Eckmann shows a good way >>>Here<<<.
Description Keys will do this, but you might need some Excel magic to order things to be able to scale the blocks. Post a sample of your shapefile.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2027
Message 6 of 18

ChicagoLooper
Mentor
Mentor

@Cadguru42 

Two options. First option uses MAPIMPORT with a plain vanilla AutoCAD annotative block. Second option maintains shapefile symbology and uses the shapefile's Style Editor. Neither option uses AutoLISP.

 

Option 1:

Use MAPIMPORT command. This command will convert the Shapefile objects into vanilla AutoCAD objects. Since your Feature Class is POINT, you can use a vanilla-ish AutoCAD BLOCK that'll replace the shapefile symbol. You can use an existing block or copy-and-paste one from another drawing (or from your personal block library). An existing block OR a block that's inserted right before MAPIMPORT will create a block definition in your dwg. Without a block definition, you won't be able to substitute an AutoCAD block that can stand-in for a feature class's symbology.

 

<<Don't confuse a BLOCK with a BLOCK DEFINITION. You may (or may not) delete the block after inserting it and this procedure will still work. Deleting the block doesn't remove the block definition, it merely removes the block symbol from modelspace. If you want to delete a block, first delete the block symbol, then use the PURGE command to delete the block definition.>>

 

Use MAPIMPORT to import the shapefile. Under the Data column, you may add Object Data (OD). Under the POINTS column, you may insert an annotative block by using 'Create as blocks' option. Then select your block from the dropdown menu. If the block isn't displayed in the dropdown then your drawing doesn't have that specific block definition.

101.jpg101.jpg

 

 

Once MAPIMPORT has been executed, you won't see any blocks. Why? Because the blocks don't have an annotative scale. You'll need to manually give the blocks an annotative scale. When properly scaled, the blocks will react to the annotative scale of your drawing. If you Created Object Data (OD) during the MapImport procedure, you'll be able to see the (OD) when you select a single point and scroll to the bottom of the Properties Palette. 

 

Select All (SA) then give all inserted blocks an annotative scale. 

 

<<Alternatively you may manually insert a dummy block on the target layer=>Select the dummy block=>Right click=>Select similar=>All blocks on the layer will be selected=>Go to Properties Palette=>give all the blocks an annotative scale.>>

102.jpg102.jpg

This option is the easiest, most straight forward option. It uses blocks instead of shapefile symbols. The size of the blocks are managed by the annotative scale in AutoCAD. If there's a drawback, it's the inability to store data. Yes, a block has attributes, but the shapefile has a database file (dbf) and it's still KING!! With the dbf, you can create a theme, use it to perform analysis, query the data to isolate or customize symbol appearance, and much more. 

 

 

Option 2:

You can scale the shapefile symbol so it's the same size as your AutoCAD annotative block.

Example: I have an annotative block. The block is shaped like a circle with a radius of 0.05-feet. I would like the shapefile's symbol to be the same size as the annotative block. My modelspace has an annotative scale of 1:30. The calculation begins with the block's radius of 0.05-feet, or the radius used when the block was originally created. Additional variables include the width and height of the symbol that'll make it consistent with an annotative block and annotative scale assigned to modelspace.

 

Size context=Map

Units=Feet (your units may vary.) For Width and Height use an expression.

 

<<In a shapefile where points are represented by a circle, Map3D scales the circle using the diameter, not radius.>>

 

201.jpg201.jpg

This method uses the symbology of the shapefile. It does NOT use an annotative block. What does this mean? It means the symbols (the circles) do NOT behave like annotative blocks. So.......If you change the drawing scale, for example from 1:30 to 1:80, you'll need to manually edit the FORMULA in the expression. 

Chicagolooper

EESignature

Message 7 of 18

Cadguru42
Advisor
Advisor

I don't need them annotative, but the 2nd option working on the shapefile helped! I didn't see the Expression options on the width & height before, so I wasn't sure how to do this. Autodesk should add an ellipse button next to the Width & Height fields instead of a drop down. I didn't think the drop down would have an option for Expression. Not the same UI ethos for the MAPIMPORT dialog where a drop down & an ellipse are present.

 

Cadguru42_0-1771330928031.pngCadguru42_0-1771330928031.png

But the expression editor kept changing what I put in, though. I had DBH * 3. Then I'd go back because I realized I forgot to change Size context to Map, but the expression changed to some odd, decimal number * DBH. Took a few times of putting in the same expression to get it working. 

 

Now I have to add a text label that shows the size then figure out how to explode all of it back down to dumb ACAD blocks for the trees and MTEXT objects.

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 8 of 18

Cadguru42
Advisor
Advisor

So why doesn't the wizard for the MAPEXPORTCURRENTMAPTODWG show up? Is this a bug or has Autodesk changed that command for C3D users?
https://help.autodesk.com/view/MAP/2025/ENU/?guid=GUID-B78F42E1-9EAA-43AF-A6B1-42119E23E0AF

Cadguru42_0-1771335714188.pngCadguru42_0-1771335714188.png

This wizard doesn't seem to exist for C3D 2026.2. 

 

EDIT: Turns out there's another command that has this wizard named MAPTOACAD. So after creating an export template to get this exported it didn't keep the scales of the symbols when it converted to their blocks.

Cadguru42_0-1771339931267.pngCadguru42_0-1771339931267.png

😠

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 9 of 18

AllenJessup
Mentor
Mentor

As mentioned by @Pointdump Description Keys can be used.

See if this video helps. I've seen where the Description Keys were also set to adjust a trunk size. Gut that was many years ago.

https://www.youtube.com/watch?v=uUda2xA90Q4

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 10 of 18

Cadguru42
Advisor
Advisor

@AllenJessup wrote:

As mentioned by @Pointdump Description Keys can be used.

See if this video helps. I've seen where the Description Keys were also set to adjust a trunk size. Gut that was many years ago.

https://www.youtube.com/watch?v=uUda2xA90Q4


Yeah, I was thinking of doing it the COGO way, but exporting the shapefile to a CSV requires the northing and easting, which aren't part of the data table. I'd have to figure out how to add that to the data in the export then setup a description key, point format and styles. Then export that out to a "dumb" ACAD drawing with blocks and MTEXT.

 

I think I'm just going to use Dynamo to manipulate the tree blocks with data created by MAPIMPORT of the shapefile.

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 11 of 18

ChicagoLooper
Mentor
Mentor

@Cadguru42 

 

<<Autodesk should add an ellipse button next to the Width & Height fields instead of a drop down.>>

I think they'll stick with that dropdown because it's what's used to write an expression for a Feature Class. That dropdown isn't being used to manage the size of plain vanilla Cad objects. If M3D is providing users the opportunity to manage a Feature Class with a dropdown, so be it. 

 

<<I don't need them annotative, but the 2nd option working on the shapefile helped,,,>>

Although the 1st option mentions annotative blocks, the blocks don't have to be annotative.  Non-annotative is fine. I mention annotative blocks because I find them easier to work with when I want to represent 'points' on a map. The 2nd option is excellent when you want to display the points as a feature class and gain the opportunity to leverage the shapefile's database. 

 

<<...explode all of it back down to dumb ACAD blocks for the trees and MTEXT objects.>>

I don't understand 'explode all of it back down.' If you're going to explode why bother with the 2nd option? Use the 1st option instead, it's easier. Way more. When using 1st option, you're already in plain vanilla mode so there's no need to explode anything back down. Use 1st option if want easy to understand, intuitive conversion from from Data to Cad. Also use 1st option when working with users who are uncomfortable working with data, are unable to work with data, or refuse to work with data.

 

Using the 1st option also provides a way to populate a block's attribute using Object Data that was harvested during the import. It's a little tricky, but not that tricky.....so in the end you're already there.....with an attributed block and a corresponding label. MapImport: Not a thing to explode, not a thing to dumb down. Another way of describing Option 1: the shapefile's geometry never enters your drawing b/c all you need is the Database and the Geospatial Projection. 

Chicagolooper

EESignature

0 Likes
Message 12 of 18

Pointdump
Consultant
Consultant

@Cadguru42,
"I'd have to figure out how to add [northing and easting] to the data"
Right-click on the feature in the Task Pane and choose "Create a Calculation". Then you can export the entire Table contents as CSV.
"going to use Dynamo to manipulate the tree blocks with data created by MAPIMPORT of the shapefile."
Let us know how that works out. Post up your DYN file.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2027
Message 13 of 18

ChicagoLooper
Mentor
Mentor

@Cadguru42 

 

<<...I've got a shapefile of tree data that includes a field for size and common name. I need to have blocks scaled based on the size field, three types of blocks used based on common name, and have a label for each tree that says XX" TREE that uses the size field data.>>

 

If your shapefile has fields with

  1. Tree size (either canopy diameter or tree diameter)
  2. Type (bush, conifer, deciduous) 

then it'll be easy to create a tree map. You could use either Option 1 or 2 noted above. I'd recommend option 2 because if the data changes, say an error with type or size, the change could be made in the shapefile's data table and the result would be reflected in tree's appearance on your map.

 

For example:

You can use 3 colors (your colors may vary):

  1. light green=bush
  2. medium green=conifer
  3. dark green=deciduous

You can use 3 different symbols too. Or you may use the same symbol for all tree since the color can indicate Tree Type.

 

The size of the symbol would be tied directly to the shapefile's database, since you have a field with 'size' data. The size field will determine the symbol's size.

 

If it were me, I'd make ranges for size. For example, for trunk diameter.

  1. <6"
  2. 6.1"-12"
  3. 12.1"-18"
  4. 18.1"-30"
  5. >30"

Your ranges may vary.

 

You could also make the symbol size on a one-to-one basis, where each individual symbol size is directly related to trunk diameter field. Be careful, though, many of the symbols will appear to be the same to the naked eye and offer little to help the audience the chance to differentiate one size from another. Ranges might not be ideal, but they offer the viewer to quickly see which trees are large and which are skinny. Even though it might not be accurate, the trunk size is commonly use to ascertain tree age and height, i.e. a young tree does not have a trunk diameter of 20" and a sapling won't likely be 3 stories tall.

 

If you maintain the shapefile and database, you can even create maps showing which deciduous trees are skinny and which are fat. Where conifers are dense and where they are sparse or nonexistent. Or you can make a map displaying tree size regardless of genus. 

 

If you have data regarding tree Condition in addition to type and size, you can make even more maps. For example, if Condition is a field described as good, fair, to be taken down, and unknown, you can make a make map displaying which trees must be removed by the Dept. of Public Works and where those trees are located.

 

If your data also includes a field indicating Status, you may also map which trees are Protected and which trees aren't. You may also combine the fields Status, Type, and Size and map out which deciduous trees >30" are Protected and can't be removed without permission. Data is King. Why reduce good data to plain vanilla objects?

   

Chicagolooper

EESignature

0 Likes
Message 14 of 18

Cadguru42
Advisor
Advisor

I can't edit the blocks to add attributes because these came from a project standard. I can manipulate the scaling of the blocks, but can't add attributes to do labels. The final deliverable needed is a dumb, 2d drawing of the trees as blocks scaled according to trunk size with an MTEXT that says XX" TREE that's used in a base map for a 12 mile long water transmission project. But there isn't a data field specifically for if it's a coniferous or deciduous tree to pick the symbol. I have to grab the data from the CommonName field and if it contains "pine", "fir", "spruce", etc. then use the block for that. If it's not those, then use the other block. The MAPIMPORT option doesn't do that on import. It'll require using Map 3d drawing queries and such, which I'm not nearly as familiar with compared to the FDO styling.

 

I'm semi-familiar with Dynamo. I've already got a small graph that'll take the temp block object data (not the main ones used for the deliverable) and scale it based on the size field so I know it works. I'm currently working on filtering the data by CommonName then create a block reference that matches what's needed based and placed according to what the coordinates for the temp object blocks are using. When that's done and MTEXT objects created, I can just delete the temp blocks and I'm left with the tree blocks sized accordingly. 

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 15 of 18

ChicagoLooper
Mentor
Mentor

@Cadguru42 

Based on your description, you can use MAPIMPORT on the shapefile. You can use plain vanilla AutoCAD block(s) to represent trees. If you wish, you can make all the blocks the same size and the same color. And MapImport doesn't care if it's an annotative block or a non-annotative one. 

 

 If tree size is a field in the shapefile's database then it can easily be your source to create Mtext labels. However it would be beneficial for you and others who work on the drawing if the labels were attributes of your block instead of Mtext. Using an attributed block isn't a requirement, it just make it easier to keep the label and the block together and not as separate entities.

 

If you have size size data you can, if you wish, populate the block's attribute with the size as it's listed in the shapefile's database OR you can simply insert Mtext for size. The MapImport procedure will easily make Mtext and make it plop down on the corresponding tree. Yes, you can use Mtext instead of an attributed block, but it might be less efficient compared to inserting the size as an attribute.

 

You can make your tree map as simple as you want or as sophisticated as the data and your imagination allows. 

 

Maybe I'm not seeing the overall picture. A better description of your shapefile ( big wide screenshot of the shapefile's Table view) and detailed explanation of your deliverable would go a long way in figuring out the easiest and fastest way to get there without any hiccups.

 

Chicagolooper

EESignature

0 Likes
Message 16 of 18

Cadguru42
Advisor
Advisor

I already gave the deliverable description. Just a simple, 2d drawing with blocks that are scaled according to the trunk size with an MTEXT label. This is to be a part of a base map drawing used for a water line design. We were given a shapefile from an arborist of the trees with some data. 

 

I've got it partly figured out already using Dynamo. Below are some screenshots showing where I grabbed all the temp blocks w/data (from the MAPIMPORT), get only the blocks with "pine", "spruce", and "fir" in the CommonName field, then create blocks using the project standard block for conifer and have them scaled based on the trunk size * 3 scale (previously already done to the temp blocks). 

Cadguru42_0-1771354262267.pngCadguru42_0-1771354262267.png

Cadguru42_1-1771354292917.pngCadguru42_1-1771354292917.png

 

I just need to do similar to the bushes and deciduous trees. Then create the MTEXT labels.

C3D 2024-2026
Windows 11
32GB RAM
Message 17 of 18

Cadguru42
Advisor
Advisor

Cadguru42_0-1771363643386.pngCadguru42_0-1771363643386.png

I did it using Dynamo. Here's how I did it ultimately.

  1. MAPIMPORT the shapefile with object data, use a temp block on a temp layer.
  2. Use Dynamo to take the trunk width multiplied by 3 to scale the temp blocks.
  3. Use Dynamo to filter all conifer trees, add the conifer blocks and scale them based on temp location and scale
  4. Use Dynamo to filter all bushes, add the bush blocks to drawing.
  5. Use Dynamo to grab all conifers and bushes, invert selection, then add the deciduous blocks and scale them based on temp block scale and location
  6. Use Dynamo to take trunk size, filter all non-zero data, get max bounding box X value of scaled blocks, subtract that from insertion X location, add one, then create an MTEXT object at that point that includes the trunk size value plus " TREE. 

    @Pointdump Here's the graph I used. Although, it's missing the original nodes I used to add the scale to the temp blocks.

C3D2026.2_COC_TreeData_2026-02-17_04-15-40.pngC3D2026.2_COC_TreeData_2026-02-17_04-15-40.png

C3D 2024-2026
Windows 11
32GB RAM
Message 18 of 18

AdammReilly
Collaborator
Collaborator

All of that could have been done with a query from a temp drawing into your target drawing.

But, I guess Dynamo is the cooler way to go. 😄

Adam Reilly
Civil 3D 2026
Creator A16 AI+ A3HVFG
Windows 11 Pro
AMD Ryzen AI 9 365 w/ Radeon 880M
LinkedIn
Group Leader badge
Austin CADD User Group
LinkedIn | Discord
Civil 3D Certified Professional