AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I get the difference between two features?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
takuya.azuma
520 Views, 1 Reply

How can I get the difference between two features?

Hello.

 

I'm studying AutoCAD Map 3D 2017 Platform API  in C# and making sample program.

 

I want to get the difference between the feature being updated and the original one occuring AcMapFeatureService.FeatureToBeUpdated event, however AcMapFeature class, which Get(Original)Feature()#AcMapFeatureToBeEventArgs returns, does not have geometric values.

Using this class, I  want to get how much it moves from the original position.

 

Here is my code.

var fs = AcMapServiceFactory.GetService(MgServiceType.FeatureService) as AcMapFeatureService;

fs.FeatureToBeUpdated += (sender, args) =>
{
    var originalFeature = args.GetOriginalFeature();
    var updatedFeature = args.GetFeature();

    // get the difference
}

 

Anyone knows how to do that? Or another solution exists? Any comments would be gratefully appreciated. Thank you.

1 REPLY 1
Message 2 of 2
takuya.azuma
in reply to: takuya.azuma

Sorry, I could get concrete values by casting MgProperty into Mg○○Property like MgInt32Property.

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

Post to forums  

Autodesk Design & Make Report