| Правила | Регистрация | Пользователи | Поиск | Сообщения за день | Все разделы прочитаны |  Справка по форуму | Файлообменник |

Вернуться   Форум DWG.RU > Программное обеспечение > Программирование > Опять про исчезающие тулбары

Опять про исчезающие тулбары

Ответ
Поиск в этой теме
Непрочитано 03.01.2005, 03:46 #1
Опять про исчезающие тулбары
Startrek
 
AutoCAD/AutoLISP
 
Seattle/USA
Регистрация: 27.08.2003
Сообщений: 1,133

Уважаемые коллеги,
Такой вопрос. Я тут для моих местных (америкасйих) нужд по просьбе "трудящейся инженерной интеллигенции" сделал меню с исчезающими тулбарами (выпадающие кнопочки не совсем устраивают народ) всем очень нравится потому как в "поле" пользуются ноутбуками с крохотным экраном, прошу не критиковать выбор кнопок - делал под ключ, то бишь как попросили. Все работает, проблема - когда загружаю меню (mnu и mnl) выскакивает один тулбар, а не должен...... ну никак не поиму где проблема, может кто заметит.
Буду очень благодарен, ну а если вам и самим понравится так пользуйтесь на здоровье.
Надеюсь кто-нибудь засечет ошибку.


Код:
[Выделить все]
Save as DTB.MNU

***MENUGROUP=DTB

***POP15
**MYGROUP
ID_DTB         [DTB]
               [BTN-Modify]^C^C(c:DTB1) 
               [BTN-Draw]^C^C(c:DTB2) 
               [BTN-Dimmensions]^C^C(c:DTB3) 
               [BTN-Text]^C^C(c:DTB4) 

***TOOLBARS
**BTN-MODIFY
ID_BTN_Modify_0 [_Toolbar("BTN-Modify", _Floating, _Hide, 200, 300, 1)]
ID_Matchprop_0 [_Button("Match Properties", "RCDATA_16_MATCH", "RCDATA_16_MATCH")](command"toolbar" "BTN-Modify" "h");'_matchprop 
ID_Copy_0      [_Button("Copy Object", "RCDATA_16_COPYOB", "RCDATA_16_COPYOB")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),grip),_copy,^C^C_copy) 
ID_Move_0      [_Button("Move", "RCDATA_16_MOVE", "RCDATA_16_MOVE")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),grip),_move,^C^C_move) 
               [--]
ID_Rotate_0    [_Button("Rotate", "RCDATA_16_ROTATE", "RCDATA_16_ROTATE")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),grip),_rotate,^C^C_rotate) 
ID_Mirror_0    [_Button("Mirror", "RCDATA_16_MIRROR", "RCDATA_16_MIRROR")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),grip),_mirror,^C^C_mirror) 
ID_Offset_0    [_Button("Offset", "RCDATA_16_OFFSET", "RCDATA_16_OFFSET")]^C^C(command"toolbar" "BTN-Modify" "h");_offset 
ID_Array_0     [_Button("Array", "RCDATA_16_ARRREC", "RCDATA_16_ARRREC")]^C^C(command"toolbar" "BTN-Modify" "h");_array 
ID_Scale_0     [_Button("Scale", "RCDATA_16_SCALE", "RCDATA_16_SCALE")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),grip),_scale,^C^C_scale) 
ID_Stretch_0   [_Button("Stretch", "RCDATA_16_STRETC", "RCDATA_16_STRETC")](command"toolbar" "BTN-Modify" "h");$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_stretch,^C^C_stretch) 
ID_Lengthen_0  [_Button("Lengthen", "RCDATA_16_LENGTH", "RCDATA_16_LENGTH")]^C^C(command"toolbar" "BTN-Modify" "h");_lengthen 
ID_Trim_0      [_Button("Trim", "RCDATA_16_TRIM", "RCDATA_16_TRIM")]^C^C(command"toolbar" "BTN-Modify" "h");_trim 
               [--]
ID_Extend_0    [_Button("Extend", "RCDATA_16_EXTEND", "RCDATA_16_EXTEND")]^C^C(command"toolbar" "BTN-Modify" "h");_extend 
ID_Break_0     [_Button("Break", "RCDATA_16_BRE2PT", "RCDATA_16_BRE2PT")]^C^C(command"toolbar" "BTN-Modify" "h");_break 
ID_Chamfer_0   [_Button("Chamfer", "RCDATA_16_CHAMFE", "RCDATA_16_CHAMFE")]^C^C(command"toolbar" "BTN-Modify" "h");_chamfer 
               [--]
ID_Fillet_0    [_Button("Fillet", "RCDATA_16_FILLET", "RCDATA_16_FILLET")]^C^C(command"toolbar" "BTN-Modify" "h");_fillet 
ID_Divide_0    [_Button("Divide", "RCDATA_16_DIVIDE", "RCDATA_16_DIVIDE")]^C^C(command"toolbar" "BTN-Modify" "h");_divide 
ID_Measure_0   [_Button("Measure", "RCDATA_16_MEASUR", "RCDATA_16_MEASUR")]^C^C(command"toolbar" "BTN-Modify" "h");_measure 
ID_Hatchedit_0 [_Button("Edit Hatch", "RCDATA_16_HATEDI", "RCDATA_16_HATEDI")]^C^C(command"toolbar" "BTN-Modify" "h");_hatchedit 
ID_Pedit_0     [_Button("Edit Polyline", "RCDATA_16_PEDIT", "RCDATA_16_PEDIT")]^C^C(command"toolbar" "BTN-Modify" "h");_pedit 
ID_BattMan_0   [_Button("Block Attribute Manager", "RCDATA_16_BATTMAN", "RCDATA_16_BATTMAN")]^C^C(command"toolbar" "BTN-Modify" "h");_BattMan 
ID_EAttEdit_0  [_Button("Edit Attribute", "RCDATA_16_ATTEDI", "RCDATA_16_ATTEDI")]^C^C(command"toolbar" "BTN-Modify" "h");_eattedit 
ID_AtteditGlo_0 [_Button("Edit Attribute Globally", "RCDATA_16_ATTEDG", "RCDATA_16_ATTEDG")]^C^C(command"toolbar" "BTN-Modify" "h");_-attedit 

**BTN-DRAW
ID_BTN_Draw_0  [_Toolbar("BTN-Draw", _Floating, _Hide, 200, 300, 1)]
ID_Line_0      [_Button("Line", "RCDATA_16_LINE", "RCDATA_16_LINE")]^C^C(command"toolbar" "BTN-Draw" "h");_line 
ID_Pline_0     [_Button("Polyline", "RCDATA_16_PLINE", "RCDATA_16_PLINE")]^C^C(command"toolbar" "BTN-Draw" "h");_pline 
ID_Ray_0       [_Button("Ray", "RCDATA_16_RAY", "RCDATA_16_RAY")]^C^C(command"toolbar" "BTN-Draw" "h");_ray 
ID_Arc3point_0 [_Button("Arc 3 Points", "RCDATA_16_ARC3PT", "RCDATA_16_ARC3PT")]^C^C(command"toolbar" "BTN-Draw" "h");_arc 
ID_CircleRad_0 [_Button("Circle Center Radius", "RCDATA_16_CIRRAD", "RCDATA_16_CIRRAD")]^C^C(command"toolbar" "BTN-Draw" "h");_circle 
ID_Donut_0     [_Button("Donut", "RCDATA_16_DONUT", "RCDATA_16_DONUT")]^C^C(command"toolbar" "BTN-Draw" "h");_donut 
ID_EllipseCe_0 [_Button("Ellipse Center", "RCDATA_16_ELLCEN", "RCDATA_16_ELLCEN")]^C^C(command"toolbar" "BTN-Draw" "h");_ellipse _c 
ID_Polygon_0   [_Button("Polygon", "RCDATA_16_POLYGO", "RCDATA_16_POLYGO")]^C^C(command"toolbar" "BTN-Draw" "h");_polygon 
ID_Rectang_0   [_Button("Rectangle", "RCDATA_16_RECTAN", "RCDATA_16_RECTAN")]^C^C(command"toolbar" "BTN-Draw" "h");_rectang 
ID_Revcloud_0  [_Button("Revcloud", "RCDATA_16_REVCLOUD", "RCDATA_16_REVCLOUD")]^C^C(command"toolbar" "BTN-Draw" "h");_revcloud 
ID_Table_0     [_Button("Table", "RCDATA_16_TABLE", "RCDATA_16_TABLE")]^C^C(command"toolbar" "BTN-Draw" "h");_table 
ID_Bhatch_0    [_Button("Hatch", "RCDATA_16_BHATCH", "RCDATA_16_BHATCH")]^C^C(command"toolbar" "BTN-Draw" "h");_bhatch 
ID_Boundary_0  [_Button("Boundary", "RCDATA_16_BPOLY", "RCDATA_16_BPOLY")]^C^C(command"toolbar" "BTN-Draw" "h");_boundary 
ID_Region_0    [_Button("Region", "RCDATA_16_REGION", "RCDATA_16_REGION")]^C^C(command"toolbar" "BTN-Draw" "h");_region 
ID_PointMult_0 [_Button("Point", "RCDATA_16_POINT", "RCDATA_16_POINT")]*^C^C_point 
               [--]
ID_Bmake_0     [_Button("Make Block", "RCDATA_16_BLOCK", "RCDATA_16_BLOCK")]^C^C(command"toolbar" "BTN-Draw" "h");_block 

**BTN-DIMENSIONS
ID_BTN_Dimensions_0 [_Toolbar("BTN-Dimensions", _Floating, _Show, 200, 300, 1)]
ID_QDim_0      [_Button("Quick Dimension", "RCDATA_16_QDIM", "RCDATA_16_QDIM")]^C^C(command"toolbar" "BTN-Dimensions" "h");_qdim 
ID_Leader_0    [_Button("Quick Leader", "RCDATA_16_QLEADER", "RCDATA_16_QLEADER")]^C^C(command"toolbar" "BTN-Dimensions" "h");_qleader 
ID_Dimlinear_0 [_Button("Linear Dimension", "RCDATA_16_DIMLIN", "RCDATA_16_DIMLIN")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimlinear 
ID_Dimcontin_0 [_Button("Continue Dimension", "RCDATA_16_DIMCON", "RCDATA_16_DIMCON")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimcontinue 
ID_Dimedito_0  [_Button("Oblique Dimensions", "RCDATA_16_DIMOBL", "RCDATA_16_DIMOBL")]^C^C(command"toolbar" "BTN-Dimensions" "h");(command"toolbar" "BTN-Dimensions" "h");_dimedit _o 
ID_Dimaligne_0 [_Button("Aligned Dimension", "RCDATA_16_DIMALI", "RCDATA_16_DIMALI")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimaligned 
ID_Dimangula_0 [_Button("Angular Dimension", "RCDATA_16_DIMANG", "RCDATA_16_DIMANG")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimangular 
ID_Dimradius_0 [_Button("Radius Dimension", "RCDATA_16_DIMRAD", "RCDATA_16_DIMRAD")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimradius 
ID_DimteditH_0 [_Button("Align Text Home", "RCDATA_16_DIMHOM", "RCDATA_16_DIMHOM")]^C^C(command"toolbar" "BTN-Dimensions" "h");_dimedit _h 
ID_DimstyleA_0 [_Button("Update", "RCDATA_16_DIMUPD", "RCDATA_16_DIMUPD")]^C^C(command"toolbar" "BTN-Dimensions" "h");_-dimstyle _apply 

**BTN-TEXT
ID_BTN_Text_0  [_Toolbar("BTN-Text", _Floating, _Hide, 200, 300, 1)]
ID_Mtext_0     [_Button("Multiline Text", "RCDATA_16_MTEXT", "RCDATA_16_MTEXT")]^C^C(command"toolbar" "BTN-Text" "h");_mtext 
ID_Dtext_0     [_Button("Single Line Text", "RCDATA_16_SINGLE_DTEXT", "RCDATA_16_SINGLE_DTEXT")]^C^C(command"toolbar" "BTN-Text" "h");_dtext 
ID_Style_0     [_Button("Text Style Manager", "RCDATA_16_TXTSTYLE", "RCDATA_16_TXTSTYLE")](command"toolbar" "BTN-Text" "h");'_style 
ID_Ddedit_0    [_Button("Edit Text", "RCDATA_16_TEXEDI", "RCDATA_16_TEXEDI")]^C^C(command"toolbar" "BTN-Text" "h");_ddedit 
ID_Scaletext_0 [_Button("Scale Text", "RCDATA_16_SCALETXT", "RCDATA_16_SCALETXT")]^C^C(command"toolbar" "BTN-Text" "h");_scaletext 
ID_Justifyte_0 [_Button("Justify Text", "RCDATA_16_JUSTIFYTXT", "RCDATA_16_JUSTIFYTXT")]^C^C(command"toolbar" "BTN-Text" "h");_justifytext 


***HELPSTRINGS
ID_ARC3POINT_0 [Creates an arc using three points:  ARC]
ID_DIMRADIUS_0 [Creates radius dimensions for circles and arcs:  DIMRADIUS]
ID_FILLET_0    [Rounds and fillets the edges of objects:  FILLET]
ID_STYLE_0     [Creates, modifies, or sets named text styles in your drawing:  STYLE]
ID_QDIM_0      [Quickly create dimension arrangements:  QDIM]
ID_EATTEDIT_0  [Edits attributes on a block insert:  EATTEDIT]
ID_BHATCH_0    [Fills an enclosed area or selected objects with a hatch pattern:  BHATCH]
ID_LEADER_0    [Creates a leader and annotation:  QLEADER]
ID_BOUNDARY_0  [Creates a region or a polyline from an enclosed area:  BOUNDARY]
ID_CIRCLERAD_0 [Creates a circle using a specified radius:  CIRCLE]
ID_MATCHPROP_0 [Applies the properties of a selected object to other objects:  MATCHPROP]
ID_HATCHEDIT_0 [Modifies an existing hatch object:  HATCHEDIT]
ID_ELLIPSECE_0 [Creates an ellipse using a specified center point:  ELLIPSE]
ID_BREAK_0     [Breaks the selected object between two points:  BREAK]
ID_BATTMAN_0   [Manages attributes on block definitions:  BATTMAN]
ID_DIMTEDITH_0 [Moves dimension text back to its default position:  DIMTEDIT]
ID_STRETCH_0   [Moves or stretches objects:  STRETCH]
ID_REGION_0    [Converts an object that encloses an area into a region object:  REGION]
ID_PLINE_0     [Creates a 2D polyline:  PLINE]
ID_ATTEDITGLO_0 [Edits the variable attributes of a block:  -ATTEDIT]
ID_BMAKE_0     [Creates a block definition from selected objects:  BLOCK]
ID_JUSTIFYTE_0 [Sets justification for selected text:  JUSTIFYTEXT]
ID_DTEXT_0     [Displays text on screen as it is entered:  DTEXT]
ID_DONUT_0     [Creates filled circles and rings:  DONUT]
ID_DIMLINEAR_0 [Creates linear dimensions:  DIMLINEAR]
ID_DIMANGULA_0 [Creates an angular dimension:  DIMANGULAR]
ID_SCALETEXT_0 [Scales selected text objects:  SCALETEXT]
ID_DIMALIGNE_0 [Creates an aligned linear dimension:  DIMALIGNED]
ID_DIMEDITO_0  [Makes the extension lines of linear dimensions oblique:  DIMEDIT]
ID_SCALE_0     [Enlarges or reduces objects proportionally in the X, Y, and Z directions:  SCALE]
ID_PEDIT_0     [Edits polylines and three-dimensional polygon meshes:  PEDIT]
ID_POLYGON_0   [Creates an equilateral closed polyline:  POLYGON]
ID_DIMCONTIN_0 [Continues a linear, angular, or ordinate dimension from the second extension line of the previous or a selected dimension:  DIMCONTINUE]
ID_MOVE_0      [Displaces objects a specified distance in a specified direction:  MOVE]
ID_ROTATE_0    [Rotates objects about a base point:  ROTATE]
ID_TRIM_0      [Trims objects at a cutting edge defined by other objects:  TRIM]
ID_REVCLOUD_0  [Creates a polyline of sequential arcs to form a cloud shape:  REVCLOUD]
ID_MEASURE_0   [Places point objects or blocks at measured intervals on an object:  MEASURE]
ID_CHAMFER_0   [Bevels the edges of objects:  CHAMFER]
ID_POINTMULT_0 [Creates multiple point objects:  POINT]
ID_RAY_0       [Creates a semi-infinite line:  RAY]
ID_DIVIDE_0    [Places evenly spaced point objects or blocks along the length or perimeter of an object:  DIVIDE]
ID_COPY_0      [Duplicates objects:  COPY]
ID_MIRROR_0    [Creates a mirror image copy of objects:  MIRROR]
ID_ARRAY_0     [Creates multiple copies of objects in a pattern:  ARRAY]
ID_DDEDIT_0    [Edits text, dimension text, and attribute definitions:  DDEDIT]
ID_MTEXT_0     [Creates a multiple-line text object:  MTEXT]
ID_TABLE_0     [Creates an empty table object in a drawing: TABLE]
ID_LINE_0      [Creates straight line segments:  LINE]
ID_3DPOLY_0    [Creates a polyline of line segments in 3D space:  3DPOLY]
ID_RECTANG_0   [Creates a rectangular polyline:  RECTANG]
ID_LENGTHEN_0  [Changes the length of objects and the included angle of arcs:  LENGTHEN]
ID_EXTEND_0    [Extends an object to meet another object:  EXTEND]
ID_DIMSTYLEA_0 [Updates dimension objects with the current dimension style:  -DIMSTYLE]

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Save as DTB.MNL

(defun c:dtb1() 
(command "toolbar" "BTN-Modify" "f" "200,300" "1") 
(princ) 
)

(defun c:dtb2() 
(command "toolbar" "BTN-Draw" "f" "200,300" "1") 
(princ) 
)

(defun c:dtb3() 
(command "toolbar" "BTN-Dimensions" "f" "200,300" "1") 
(princ) 
)

(defun c:dtb4() 
(command "toolbar" "BTN-Text" "f" "200,300" "1") 
(princ) 
)
Просмотров: 3505
 
Непрочитано 03.01.2005, 08:43
#2
BigBrother

Design & programming :)
 
Регистрация: 14.02.2004
Новосибирск
Сообщений: 172
<phrase 1= Отправить сообщение для BigBrother с помощью Skype™


ID_BTN_Dimensions_0 [_Toolbar("BTN-Dimensions", _Floating, _Show , 200, 300, 1)]
BigBrother вне форума  
 
Автор темы   Непрочитано 03.01.2005, 16:53
#3
Startrek

AutoCAD/AutoLISP
 
Регистрация: 27.08.2003
Seattle/USA
Сообщений: 1,133


>>BigBrother
Огромное Спасибo
Ну надо же -пропустил а ведь как просто.
Startrek вне форума  
Ответ
Вернуться   Форум DWG.RU > Программное обеспечение > Программирование > Опять про исчезающие тулбары

Размещение рекламы
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск