Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there some way to call this Autocad command (REGEN3) by way of API .NET?
Solved! Go to Solution.
Is there some way to call this Autocad command (REGEN3) by way of API .NET?
Solved! Go to Solution.
Document doc = Application.DocumentManager.MdiActiveDocument;
doc.Editor.Regen();
Thanks for your reply @MateusMaciel , but this Regen3 command is for 3D Objects.
This Editor.Regen is that one:
https://knowledge.autodesk.com/pt-br/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2018/PTB...
Obrigado pela atenção!
@phliberato sorry,
You have tried the following:
Document doc = Application.DocumentManager.MdiActiveDocument;
doc.SendStringToExecute("REGEN3\n", true, false, false);
In this case, it would run via a command prompt;
I have already used this approach as workaround, but I'm looking for some API function approach.
Hi Pedro,
I have a situation where I also need Regen3.
Did you find an API eqivalent to the command?
best regards to BeHo
Christian
Some years ago I received next code from ADN DevHelp:
Document doc = Application.DocumentManager.MdiActiveDocument;
Autodesk.AutoCAD.GraphicsSystem.Manager mpManager = doc.GraphicsManager;
Autodesk.AutoCAD.GraphicsSystem.KernelDescriptor descriptor =
new Autodesk.AutoCAD.GraphicsSystem.KernelDescriptor();
descriptor.addRequirement(Autodesk.AutoCAD.UniqueString.Intern("3D Drawing"));
Autodesk.AutoCAD.GraphicsSystem.GraphicsKernel kernal =
Autodesk.AutoCAD.GraphicsSystem.Manager.AcquireGraphicsKernel(descriptor);
Autodesk.AutoCAD.GraphicsSystem.Model Model = mpManager.GetDBModel(kernal);
Model.Invalidate(Autodesk.AutoCAD.GraphicsSystem.InvalidationHint.InvalidateAll);
Application.DocumentManager.MdiActiveDocument.Editor.Regen();
You can try it.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
![]() | ![]() |
Hi @ChristianBlei ,
Good to see you here!
I didn't find an API eqivalent to this Regen3 command. However I noticed that in CAD recent versions the Regen command works well instead of Regen3 but I don't use the Regen function of Editor class, because it doesn't update the Project Explorer of Advance Steel. I submitted a pull request for the AS Dynamo plugin that I used this approach.
https://github.com/DynamoDS/Dynamo-Advance-Steel/pull/73/files
Maybe in your case the code that @Alexander.Rivilis sent it will work to you.
Best regards to Düsseldorf
Hi Alexander,
thank you for sharing this snippet. It fixed the problems I have with representation of Advance Steel parts in 3D Visual styles, Conceptual ,e.g....
Do you recall differences to what Regen3 is doing?
best regards,
Christian