Jump to content

Recommended Posts

Posted (edited)

I have made a few gifs as help for understanding how to run  a command in a company menu. They work from command line but not necessarily in menus. 

 

[Test]^c^c^P(startapp "explorer D:\\XXX-CAD-TOOLS\\House water barrier.gif")

another test

[Import title]^c^c^P(vlax-invoke (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application") 'Open "D:\\XXX-cad-tools\\Import title block.gif")

 

The explorer option works in Bricscad fine opens gif and runs. The shell does not.

 

In CIV3 (startapp "explorer  D :  is all that appears on command line.

The vlax-invoke returns Nil

 

I am sure I have done it before have html links working. Tried \\ v's / also.

 

Any ideas ?

 

Edited by BIGAL
Posted

 

I don't have civ3d so I'm not sure though, how about to try use lsp. 

 

With this length of code, it seems easy to generate in one line with concatenate in excel.

 

I mainly use .mns files to create menus & toolbars.

 

in .lsp

(defun c:foo1 (/)
 (setvar 'cmdecho 0)
 (startapp "explorer D:\\XXX-CAD-TOOLS\\House water barrier.gif")
 (setvar 'cmdecho 1)
 (princ)
)

 

in .mns

***MENUGROUP=GIF_HELPS

***POP1
** AutoDraw
ID_AutoDraw    [&GIF_HELPS]
	       	[-> GIF MENU]
ID_IMAGE	[TEST FUNCTION 1 \tFOO1]^C^C_FOO1
ID_IMAGE	[TEST FUNCTION 2 \tFOO2]^C^C_FOO2
ID_IMAGE	[TEST FUNCTION 3 \tFOO3]^C^C_FOO3
[--]
   		[<-                   ]^C^C_REGENALL
[--]

 

Posted (edited)

Thanks exceed,  in a roundabout way got it to work created a mnl with the defuns in it mine will be xxxHelp1 etc At moment only 3 so not much to keep up to date but will be doing more for various clients. You need to make sure the mnu and mnl are together and in a support and trusted path. It is interesting that can do open web pages but not a local GIF.

Edited by BIGAL
Posted (edited)

how about to delete spacebar in gif file name and path

I've heard that startapp doesn't handle spacebar well

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-photo-viewer-from-lisp/m-p/5697322/highlight/true#M333168

 

 

+ i don't know exactly. i just know ".mns file is just output of old mnu file format".

but editing .mns file in notepad then once loading it with MENULOAD.

CAD makes .cuix file automatically. can use that .cuix file also next time. 

 

.mns file has little problem with icon image setting. but it works fine without icon.

when I make every ID_ to not general ID, like "ID_EXCEED_IMAGE       [ some function \t ] ~~" )

 

if I want to give it icon, editing cuix file in cad CUI command.

 

it is so simple way to make menus and toolbars.

this is why i'd like to use mns cheating 😀

 

++

one more step i studied,

our company uses both AUTOCAD and ZWCAD.

two programs are not compatible with the icon code

(RCDATA_16_~~  for AUTOCAD, ZWRC_~~  for ZWCAD)

so, I can't use one CUIX file. sadly.

so, i edit .cuix extension to .zip and unzip,  then get menugroup.cui & ToolbarRoot.cui file. then replace every RCDATA_16_ <> ZWRC_

then re-zip, then change extension again to .cuix, it works fine.
 

If I give up cuix and use mns, it is solved simply in both programs.

so this is the second reason I use mns files.😂

Edited by exceed

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...