.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Regen in all viewports
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
234 Views, 3 Replies
10-14-2008 09:23 AM
Within .Net, how would you cause a regen to happen on all viewports (i.e. the equivalent of clicking on each viewport within ACAD and typing 'REGEN').
I have tried sendStringToExecute with string 'REGEN', inconjunction with acedSetCurrentVPort with the vportNum, however it seems the sendStringToExecute is being placed on a stack and executed 3 times (if there were 3 viewports) at the end of my function, rather than it being executed immediately after it is called.
Any Ideas?
Many Thanks
Ross
I have tried sendStringToExecute with string 'REGEN', inconjunction with acedSetCurrentVPort with the vportNum, however it seems the sendStringToExecute is being placed on a stack and executed 3 times (if there were 3 viewports) at the end of my function, rather than it being executed immediately after it is called.
Any Ideas?
Many Thanks
Ross
Re: Regen in all viewports
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-14-2008 09:30 AM in reply to:
fishtoasty
I would also like to add that REGENALL does not seem to have the same desired effect as REGEN, therefore i need to call REGEN on each viewport, or something equivalent.
Many Thanks
Ross Edited by: fishtoasty on Oct 14, 2008 4:30 PM
Many Thanks
Ross Edited by: fishtoasty on Oct 14, 2008 4:30 PM
*Tony Tanzillo
Re: Regen in all viewports
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-14-2008 05:13 PM in reply to:
fishtoasty
See if this works:
Document doc = Application.DocumentManager.MdiActiveDocument;
object oAcadDoc = doc.AcadDocument;
oAcadDoc.GetType().InvokeMember( "Regen",
BindingFlags.InvokeMethod, null, oAcadDoc,
new object[] { 1 } );
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.ht m
wrote in message news:6051136@discussion.autodesk.com...
I would also like to add that REGENALL does not seem to have the same desired effect as REGEN, therefore i need to call REGEN on each viewport, or something equivalent. Many Thanks Ross Edited by: fishtoasty on Oct 14, 2008 4:30 PM
Document doc = Application.DocumentManager.MdiActiveDocument;
object oAcadDoc = doc.AcadDocument;
oAcadDoc.GetType().InvokeMember( "Regen",
BindingFlags.InvokeMethod, null, oAcadDoc,
new object[] { 1 } );
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.ht
I would also like to add that REGENALL does not seem to have the same desired effect as REGEN, therefore i need to call REGEN on each viewport, or something equivalent. Many Thanks Ross Edited by: fishtoasty on Oct 14, 2008 4:30 PM
Re: Regen in all viewports
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-15-2008 10:55 AM in reply to:
fishtoasty
thanks this seems to have solved the problem,
I forgot to mention I was coding in c++,
Thanks anyway I managed to find an equivalent solution
I forgot to mention I was coding in c++,
Thanks anyway I managed to find an equivalent solution
