Code Red > AutoLISP (Vanilla / Visual)
Is control of the Active Window Title possible in AutoCAD?
KewlToyZ:
I was curious if this could be done from a profile identification perspective?
Since this is an OS specific would it have to be an ARX app to handle on start-up?
Any feedback would be appreciated :-)
nivuahc:
I believe Keith wrote something a while back that did exactly that... but I may be wrong. :)
KewlToyZ:
Thanks Nivuahc, My aplogies but is Keith's username Keith? I haven't quite gotten familiar with first names and nicknames yet :|
Oops found posts under the username, now to narrow the search :-)
LE:
If what you are asking is to change autocad window title - that is possible with ObjectARX
KewlToyZ:
Here is the post from Keith:
--- Quote ---Ok ... this is a VBA app so ....
In a new module paste the following code
Code:
Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal HWND As Long, ByVal lpString As String) As Long
Sub SetText()
Dim RetVal As Long
RetVal = SetWindowText(Application.HWND, Interaction.InputBox("Please enter new name for AutoCAD application"))
End Sub
When you run the code it will request a new name which you can type in, then it will change the name to what you entered.
If you want to make it set to a preset value, simply remove this portion
Code:
Interaction.InputBox("Please enter new name for AutoCAD application")
and replace it with a string enclosed in quotes.. like so...
Code:
Sub SetText()
Dim RetVal As Long
RetVal = SetWindowText(Application.HWND, "Dommy2HottyCAD"))
End Sub
--- End quote ---
Now to go through and learn how to build the module for each profile :ugly:
Is this a module or a module class?
I'm leery of ObjectARX because of the changes with every build of AutoCAD.
Navigation
[0] Message Index
[#] Next page
Go to full version