Select to view content in your preferred language

IsClosed3D in arcObjects is not working

953
4
08-06-2012 05:06 AM
kamilkhan
Emerging Contributor
I am trying to check  multipatch geometry whether it is close or not. I applied isclosed3D and checked with output feature class by writing in database, there is no any addition of attribute with flag telling close or not. Any help will be appreciated.
Tags (1)
0 Kudos
4 Replies
PavanYadav
Esri Regular Contributor
I am trying to check  multipatch geometry whether it is close or not. I applied isclosed3D and checked with output feature class by writing in database, there is no any addition of attribute with flag telling close or not. Any help will be appreciated.


Greetings,
The tool adds a new field (called IsClosed) that specifies whether the multipatch is closed is added to the input multipatch feature. Yes for closed and No for not closed.

Regards,
Pavan
Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
0 Kudos
kamilkhan
Emerging Contributor
Greetings,
The tool adds a new field (called IsClosed) that specifies whether the multipatch is closed is added to the input multipatch feature. Yes for closed and No for not closed.

Regards,
Pavan


Thanks for response. Am I doing something wrong ? Can you please guide...
multipatch_1 is my multipatch geometry.

IsClosed3D isclosed=new IsClosed3D(multipatch_1);
     Object obj=isclosed.getInFeatureClass();//I checked with outfeatureclass but it is read only
     IFeatureClass fc=new FeatureClass(obj);
     IFeatureCursor ifccursor_=ifcin.IFeatureClass_insert(true);
  
   IFeatureBuffer ifcbuffer_=fc.createFeatureBuffer();
   ifccursor_.insertFeature(ifcbuffer_);
   ifccursor_.flush();
after writing this feature class when I check back its attributes then there is no any addition of field "IsClosed".
thanks in advance.
0 Kudos
PavanYadav
Esri Regular Contributor
Hi Kamil,

Still not sure what you are trying to show with that code. My  coworker shown me the following and could see the field added:

GeoProcessor gp = new GeoProcessor();
IGPUtilities gpUtil = new GPUtilities();
                    
String multipatch_1 = "C:\\arcgis\\ArcTutor\\3DAnalyst\\Exercise9\\GeoDatabase\\Lincolns.gdb\\Buildings";
IsClosed3D isclosed=new IsClosed3D(multipatch_1);
                    
IGeoProcessorResult gpResult = gp.execute(isclosed, null);
                    
if (gpResult.getStatus() == esriJobStatus.esriJobSucceeded){
   for (int i = 0; i <= gpResult.getMessageCount() - 1; i++){
      System.out.println(gpResult.getMessage(i));
   }
                        
   IFeatureClass fc = gpUtil.openFeatureClassFromString(gpResult.getOutput(0).getAsText());
                        
   int fieldIndex = fc.findField("isClosed");
                        
   if(fieldIndex != -1)
   {
      System.out.print("isClosed Field created at index: " + fieldIndex );
   } 
}

Thanks
Pavan
Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
0 Kudos
kamilkhan
Emerging Contributor
thanks a lot. I was just trying to learn using these tools in java.

thanks again.
0 Kudos