PDA

View Full Version : How to programmatically call refedit.



Paul Bryan Porter
2012-01-09, 08:39 PM
Is there a way to call refedit with a function or a class instead of calling it via acedCommand() or ads_queueexpr()?

BlackBox
2012-01-10, 05:23 AM
Consider the sendStringToExecute (http://docs.autodesk.com/ACDMAC/2011/ENU/ObjectARX%20Reference/index.html?frmname=topic&frmfile=AcApDocManager__sendStringToExecute@AcApDocument_@ACHAR__@bool@bool@bool.html) function. :wink:

BlackBox
2012-01-10, 05:27 AM
This article by Kean is a bit old, but still helpful:

Techniques for calling AutoCAD commands programmatically (http://through-the-interface.typepad.com/through_the_interface/2006/08/techniques_for_.html)

Paul Bryan Porter
2012-01-11, 10:30 PM
Thanks so much for your response! :)

Were setting up a test with the SendStringToExecute().

I found more information regarding the problem when talking to AutoDesk.

In the OEM Make Wizard we are setting some of the commands to internal.
Of them I believe refedit was the only command we actually reference in the code using acedCommand. When we get to the portion of the code that has acedCommand AutoCAD gives unknown command. When I type it in manually I get unknown command.
We tried xrefnotify as a base case as well. Xrefnotify gave unknown command in both cases as well.

For testing purposes we set the commands in the OEM that were Internal to Full.
We were able to get xrefnotify to work when it was set to Full. Refedit however was unchanged.

Paul Bryan Porter
2012-01-17, 03:10 PM
Very Strange, we are getting the internal commands from the OEM to work as intended in 64bit OEM. But in 32bit OEM we are having the problem with refedit not being callable. Ill let you know more as as I know more.

Paul