Select to view content in your preferred language

How to create different blocks based on field values?

2104
8
Jump to solution
04-25-2020 04:35 PM
Roberts_Craig
Occasional Contributor

We are collecting as-built pipeline features using a GNSS system (EOS Arrow Gold) with ESRI Collector, and using the data to update our as-built drawings in Autodesk Civil 3D 2019.  We have situations where we have one feature class that we would like to plot differently based on field values.  Example:  Feature class "valve" may have one symbol for "gate valve" and a different symbol for "butterfly valve".

Is there a recommended approach to have two or more different blocks for one feature class?  From what I've found, blocks must be named exactly the same as the feature class and layer, and therefore have a one-to-one relationship.  I looked into the block tools in the ArcGIS for Autocad Bonus Tools but they do not seem to apply here.   

Dynamic blocks in Autocad may solve the problem.  Is there a different approach I should be considering?

0 Kudos
1 Solution

Accepted Solutions
KarenHodge
Esri Contributor

Craig, if your source feature class is defined with a unique value renderer or subtypes using a field like "Valve Type" before publishing, when you add that service in ArcGIS for AutoCAD, each type can have a different symbolic representation, but it will still be one feature class.  Each type can have a different unique block symbol.

View solution in original post

0 Kudos
8 Replies
DonKuehne
Esri Contributor

I have heard of some customers using dynamic blocks, but it would have to independent (or post process) of the web feature layer block drawing capability that you point out uses a single block per feature layer.   Using this as an opportunity to learn more.  If it could work anyway, how would you want ArcGIS for AutoCAD to help you with your blocks?

0 Kudos
Roberts_Craig
Occasional Contributor

Hi Don,

It sounds like you may have this in the next release, but since you asked:

It would be nice to be able to select the point block field similar to selecting a label field in the Bonus Tools.  A default point block could be assigned for mismatches.  

Point Block Idea for ArcGIS for Autocad

This may complicate linking the block attributes and feature fields.  Maybe a nested block?  (I'm just thinking out loud...)  I'll try Karen's solution.

I'll be looking forward to your next release.

Thanks!

0 Kudos
DonKuehne
Esri Contributor

Craig,

The block bonus tools for AFA370  do create different blocks by looking for a field called  BLOCKNAME.   It may be a little while after the release of AFA400 before the bonus tools are updated.  In the meantime Karen's is the right answer.:  

AFA_BLOCKTOFIELD (found in "afa_blocktools.lsp")

This AutoLISP command use the current ArcGIS for AutoCAD POINT feature class or feature service.  It will process each POINT feature that is also a block entity to determine if it has any block attributes.  It will check for ArcGIS field names: BLOCKNAME, ROTATION or ANGLE, XSCALE, YSCALE and ZSCALE and if found will populate those ArcGIS field values with the current AutoCAD entity property for those values.  See AFA_FIELDTOBLOCK to perform the reverse operationOlder version of this function also synchronized fields that matched tag names which is no longer necessary in ArcGIS for AutoCAD 365 since it now happens automatically.

0 Kudos
Roberts_Craig
Occasional Contributor

Thank you Don.  I was under the impression that AFA_BLOCKTOFIELD was for attribute<>field correlation only  This makes it clear.

0 Kudos
KarenHodge
Esri Contributor

Craig, if your source feature class is defined with a unique value renderer or subtypes using a field like "Valve Type" before publishing, when you add that service in ArcGIS for AutoCAD, each type can have a different symbolic representation, but it will still be one feature class.  Each type can have a different unique block symbol.

0 Kudos
Roberts_Craig
Occasional Contributor

Thank you Karen.  I'll share your response with our GIS developer to see if we can add a unique value renderer or subtypes to the service (I am more on the CAD side of this project).  

I am still having trouble understanding how you can get unique blocks since the block, layer name, and feature class all require the same name.  If the block is named for the subtype, will that work?  Just to confirm, when you say each type can have a unique block symbol, do you mean Autocad blocks, correct? (as opposed to images of AGIS symbols such as with WMS)  I talked to our developer today and he did mention using dynamic blocks as a possible solution.

0 Kudos
KarenHodge
Esri Contributor

Yes...you've got it.  With subtypes, the features will be on unique layers.  If your feature class name is "Esri_Valves" and one of the subtypes is for Butterfly and the other for Gate, you'll end up with three unique AutoCAD layers, but only one feature class.  The name of the Autocad block definition needs to match the name of the associated AutoCAD layer.  When you synchronize or add the feature service, it will render the point features as block inserts in the AutoCAD drawing.

I hope that's more clear

BTW, in the almost released version of ArcGIS for AutoCAD, the block names do not need to match the name.  You'll be able to assign any block to any feature service layer (or subtype).

Roberts_Craig
Occasional Contributor

Thank you Karen.  That's very helpful.  We will give it a shot.