• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

creation and cancellation

  • Thread starter Thread starter yag
  • Start date Start date

yag

Guest
Hello

Therefore via code creates a menu with the classic commands that the vba of autocad provides also present as an example in the help.

at every start of my application I make a loop on the menu items
in group zero gates and add type appl_1.0.00 the first time all
works well at the next reboot (of my appliccation) because being
previously deleted does not add it as long as you do not restart autocad

do you have any advice on this to avoid this torture :-) ?
 
Hello

Therefore via code creates a menu with the classic commands that the vba of autocad provides also present as an example in the help.

at every start of my application I make a loop on the menu items
in group zero gates and add type appl_1.0.00 the first time all
works well at the next reboot (of my appliccation) because being
previously deleted does not add it as long as you do not restart autocad

do you have any advice on this to avoid this torture :-) ?
you cannot post an examplep
or the code that would be even better?
 
you cannot post an examplep
or the code that would be even better?
There he is.
Code:
dim gb_numeroblocchitrovati as integer
set gb_versioni = new collection
gb_versioni.add "aaa- start-"
gb_versioni.add "aaa- 1.0.0.0"
gb_versioni.add "aaa- 1.0.0.1"

dim tmpfieldname as string
dim currmenugroup as acadmenugroup
set currmenugroup = thisdrawing.application.menugroups.item(0)

for i = 0 to currmenugroup.menus.count
        if i < currmenugroup.menus.count then
            if currmenugroup.menus(i).name <> gb_versioni(gb_versioni.count) then
                currmenugroup.menus.removemenufrommenubar (currmenugroup.menus(i).name)
            end if
        end if
next

err:
'msgbox err.description
gb_versionecorrente = gb_versioni(gb_versioni.count)

....
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top