GetChangeTypeGeometry triggered when wall moves but geometry does not change

GetChangeTypeGeometry triggered when wall moves but geometry does not change

harrymattison
Advocate Advocate
917 Views
4 Replies
Message 1 of 5

GetChangeTypeGeometry triggered when wall moves but geometry does not change

harrymattison
Advocate
Advocate

Hi,

 

I want to use Dynamic Model Update to capture when geometry is changed, but not when an object moves. The help for Element.GetChangeTypeGeometry says:

 

"For example, changes like cutting a hole in a wall or adjusting its height are considered to be geometric changes. However, moving a wall to a different location without modifying its shape is not considered to be a change in geometry and will not trigger the Updater."

 

But when the code below is used an a free-standing wall is moved without modifying its shape, the updater is triggered.

 

How can I get the trigger to only occur when the wall geometry changes, but not when it is moved?

 

 

public void registerUpdater()
    {
        Geomupdater updater = new Geomupdater(this.Application.ActiveAddInId);
        UpdaterRegistry.RegisterUpdater(updater, true);

        UpdaterRegistry.AddTrigger(updater.GetUpdaterId(),
            new ElementClassFilter(typeof(Wall)),
            Element.GetChangeTypeGeometry());
    }
        
    public class Geomupdater : IUpdater
    {
        static AddInId m_appId;
        static UpdaterId m_updaterId;
        public Geomupdater(AddInId id)
        {
            m_appId = id;
            m_updaterId = new UpdaterId(m_appId, new Guid("FB2BF2B1-4C06-42d4-27C1-D1B4EB593EFA"));
        }
        public void Execute(UpdaterData data)
        {
            Document doc = data.GetDocument();

            foreach (ElementId id in data.GetModifiedElementIds())
            {
                Element e = doc.GetElement(id);
                TaskDialog.Show("Modified Element",e.Category.Name + " " + e.Name + " " + e.Id.IntegerValue);
            }
        }
        public string GetAdditionalInformation() { return "test"; }
        public ChangePriority GetChangePriority() { return ChangePriority.FloorsRoofsStructuralWalls; }
        public UpdaterId GetUpdaterId() { return m_updaterId; }
        public string GetUpdaterName() { return "test"; }
    }

918 Views
4 Replies
Replies (4)
Message 2 of 5

Aaron.Lu
Autodesk
Autodesk
Hi Harry, thanks for providing details of code:

this should be a problem, so we've logged it in our system:

CF-3763 DMU: Be able to trigger beam length change (INSTANCE_LENGTH_PARAM)


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 5

ChrisHildebranAtWork
Contributor
Contributor

It appears the issue still exists.

While testing a 'GetChangeTypeGeometry()' based updater we're developing, I've found that simply moving an eligible element laterally (NO GEOMETRY CHANGES) triggers the updater.

 

This behavior is not desired or expected, according to Autodesk documentation.

 

What I need to know, has the geometry has changed as the name suggests.


Any information about a resolution?

The original post will be six years old in 5 days.

Chris Hildebran
VDC Software Development
IBEW 48 Wireman
ISA CCST 1
JH Kelly, LLC
Message 4 of 5

RPTHOMAS108
Mentor
Mentor

"Use this change type to trigger an Updater when the geometry of an element changes. Only physical changes to shape of the element(s) will trigger the updater. For example, changes like cutting a hole in a wall or adjusting its height are considered to be geometric changes. However, moving a wall to a different location without modifying its shape is not considered to be a change in geometry and will not trigger the Updater. Note: This change type will not trigger on newly created or deleted elements or on changes caused by Undo and Redo. "

 

I hope they got the documentation wrong since there isn't a ChangeTypeLocation. Not sure ChangeTypeAny would cover it since that is likely an amalgamation of the known change types. So what do you then use to recognise a change in location? The above to me sounds like an undesirable caveat, would rather know the wall has moved since shape changes can be distinguished from location changes (probability of same face counts/areas and volumes after as before?). Some of us would like to know if the wall moved not just if someone put a window in it.

 

Sounds like a case of 'Be careful what you wish for'.

 

 

0 Likes
Message 5 of 5

ChrisHildebranAtWork
Contributor
Contributor

Submit a Support Ticket - Case 18542730 

Chris Hildebran
VDC Software Development
IBEW 48 Wireman
ISA CCST 1
JH Kelly, LLC
0 Likes