.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Multiple overrules?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi there,
I have created an overrule in AutoCAD with a regapp name of "OVERRULE_1". Added it to a polyline and away we go. Everything is fine. I have then created another overrule with a new appname " OVERRULE_2" and this one won't work unless I start the session again. I have been able to separate them out adding extra value in the xdata. But this essentially means only one app name for all my overrules and separated through x-data. Is this the correct way?
When it comes to start up I tried to start them up the same way but it only ever chooses the first one and loads that Ok.
If rat.Has("OVERRULE_1") = False Then
If Draw.Overruling = False Then
ObjectOverrule.AddOverrule(RXClass.GetClass(GetTyp
End If
DrawOverrule.Overruling = True
End If
If rat.Has("OVERRULE_2") = False Then
If Draw.Overruling = False Then
ObjectOverrule.AddOverrule(RXClass.GetClass(GetTyp
End If
DrawOverrule.Overruling = True
End If
Ta,
Maritn.
Solved! Go to Solution.
Re: Multiple overrules?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You might want to show more code because it looks like you are adding the same overrule with different Xdata filters.
Re: Multiple overrules?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Your code doesn't use multiple overrules.
Multiple overrules means that you are creating multiple instances of the overrule-based class.
You are adding the same instance of that class twice.
Re: Multiple overrules?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for your help people,
but I solved it. The overrule was set to activate in the initialize component was hitting the first one and starting it. When it got to the second one, it was already registered as being active so didn't start it. I moved these 2 lines out of the two if statements, and made it just one line of code.
If rat.Has("OVERRULE_1") = False Then
If Draw.Overruling = False Then
' ObjectOverrule.AddOverrule(RXClass.GetClass(GetTyp
End If
DrawOverrule.Overruling = True
End If
If rat.Has("OVERRULE_2") = False Then
If Draw.Overruling = False Then
' ObjectOverrule.AddOverrule(RXClass.GetClass(GetTyp
End If
DrawOverrule.Overruling = True
End If
' New
Overrule.Overruling = True
Ta,
Maritn.
