Open C3D file in Read-Only

Open C3D file in Read-Only

ODO18
Advocate Advocate
712 Views
5 Replies
Message 1 of 6

Open C3D file in Read-Only

ODO18
Advocate
Advocate

I found this method, https://www.cad-notes.com/open-autocad-drawings-as-read-only-using-right-click-from-explorer/, to create a shortcut to right-click open any file in read-only but I have Carlson running on top of Vanilla CAD on the computers.  So what happens when you do this is it opens the drawing in Carlson.  I do not want to reassoaciate dwg to Vanilla CAD, so is there a way to revise this script so it opens specifically in Vanilla CAD no matter what other applications are on this computer?

 

Below is script if you want to avoid going to the link:

 

On Error Resume Next
dim cmd_arg
set cmd_arg=wscript.Arguments
Dim acadApp
Set acadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set acadApp = CreateObject("AutoCAD.Application")
End if
acadApp.visible=True
acadApp.WindowState = normal
acadApp.Documents.Open cmd_arg(0), True

 

Thank you

 

0 Likes
713 Views
5 Replies
Replies (5)
Message 2 of 6

Sea-Haven
Mentor
Mentor

Sounds like you need to OPEN the dwg using a different profile, one that does not have Carlson loaded as Carlson is probably bundle loaded that may be difficult.

0 Likes
Message 3 of 6

ODO18
Advocate
Advocate

We currently open Vanilla CAD with a profile called "Vanilla" which opens without the Carlson bundle.  Is there a way to add a line of code to what I provided telling it to open with that profile?

0 Likes
Message 5 of 6

ODO18
Advocate
Advocate

Thank you but it is my understanding that does not apply here.  I am not opening Vanilla CAD with a shortcut directly, I am opening it with a shortcut that runs a .vba code which opens the CAD executable as read-only.  The issue is when the CAD executable opens so does the Carlson.  So the only way I can think of to get Vanilla CAD to open without Carlson would be to replace the "GetObject(, "AutoCAD.Application")" code language to run in a way that would not run the Carlson on top.  Sea Haven has a good idea but I do not know if you can write in the .vba code to open with a certain profile.

 

But to your point the easy answer would be to change the VanillaCAD icon to open as read-only.  but all of my research has turned up the following to reasons that is not possible:

1.  You cannot add a read-only tag to the shortcut Target.  This would be the easiest thing to do.

2.  You cannot create a profile that opens only in read-only.  This would be the second easiest thing to do.

 

Thank you

0 Likes
Message 6 of 6

john.uhden
Mentor
Mentor

Check to see if Carlson is being loaded as an ARX file, in which case it might be autoloading by virtue of the contents of your acad.rx file, if you have one.

If you were to have separate profiles, one of which contains a support file path to a different (maybe even empty) acad.rx file, then Carlson might not get loaded automatically for that profile.

BTW, I think your shortcuts can specify the profile to load with the /P switch after the executable name.

John F. Uhden

0 Likes