initial_focus = "a18";Still looking for another term to do the button restriction.
Hey Lee, any examples of a radio button setting the list information in a dcl you know of?
(defun c:vpt()
;=============================================================================Turn off command line responses
(command "CMDECHO" 0);DO NOT CHANGE THIS LINE
;=============================================================================
(setq userlayer (getvar "clayer"))
(setq ds2 (getvar "dimscale"))
(setq userview (getvar "ctab"))
(setq myTile (getvar "TILEMODE"))
;(> <NUMB1> <NUMB2>) Returns T if <NUMB1>is greater than <NUMB2>.
(if (> 0 myTile)
(prompt "\n Switching view tab......")
(command "tilemode" 0)
)
(command "-layer" "Make" "G-VIEW-PORT" "Color" "Red" "G-VIEW-PORT" "Plot" "No" "G-VIEW-PORT" "Set" "G-VIEW-PORT" "")
(autoload "setviewscale" '("setviewscale"))
(c:setviewscale)
(princ "\n")
(command "osmode" "523")
(princ "\n")
(command "mview")
(princ "\n")
(command (setq p1 (getpoint "\n Select first corner of window opening: ")))
(prompt "\n ")
(command (getcorner p1 "\n Select opposite corner of window opening: "))
(prompt "\n ")
(command "mspace")
(princ "\n")
(command "zoom" "e")
(princ "\n")
(command "zoom" "c")
(princ "\n")
(command (getpoint "\n Select center of view:"))
(princ "\n")
(command (strcat "1/" (rtos (getvar "dimscale") 2 0) "xp"))
(princ "\n")
(command "pspace")
(princ "\n")
(setvar "psltscale" 0)
(princ "\n")
(prompt "\n DIMSCALE returning to original setting. ")
(princ "\n")
(setvar "dimscale" ds2)
;=============================================================================Turn off command line responses
(command "CMDECHO" 1);DO NOT CHANGE THIS LINE
;=============================================================================
(prompt "\n Returning view and layer.....")
(command "ctab" userview)
(command "clayer" userlayer)
(prompt "\n View and layer returned!")
(princ)
)
Thanks Lee!! I'll read through it for sure right now.
I messed with my MPL.lsp routine and added the reactor to set dimscale & ltscale from the CANNOSCALE.
But your system would be much smoother in format without slamming every thing in to select one item.
Thank you, those descriptions are much better and clearer than the ones I was making to figure it out.
The _list function had me scratching my head quite a bit.
That and the or function for setq p with the string positions.
While short they confused me a bit how they functioned.
Command: mpl
Scale list being loaded, Please be patient......
** Command not allowed in Model Tab **
32 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Hey Sam, Let me know what version of AutoCAD you are using.
I did a few corrections.
Check these out:
Command: mpl
Scale list being loaded, Please be patient......
mspace
** Command not allowed in Model Tab **
Command:
0 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
What I was showing with the VPT command routine, was that the MPL can be applied to set the VPORT scale. In modelspace its global, with VPT it is view port specific.
Command: vpt
ACAD & Custom linetypes are loaded with General Layers!!
Error - linetype load failed for SML-DASH2
#<%catch-all-apply-error%>
#<%catch-all-apply-error%>
Select first corner of window opening:
Select opposite corner of window opening:
Scale list being loaded, Please be patient......
16 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Command:
Command: *Cancel*
Command: *Cancel*
Command: MPL
Scale list being loaded, Please be patient......
0 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Ahh forgot about the custom line types.
And You don't seem to have the MPL.dcl file loading?
Command: VPTone more attachments to be cont...
CMDECHO
Enter new value for CMDECHO <1>: 0
ACAD & Custom linetypes are loaded with General Layers!!
Select first corner of window opening:
Select opposite corner of window opening:
Scale list being loaded, Please be patient......
32 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Command: *Cancel*
Command: *Cancel*
Command: <Switching to: Model>
Restoring cached viewports.
Command: mpl
Scale list being loaded, Please be patient......
mspace set.
0 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Ahh forgot about the custom line types.
And You don't seem to have the MPL.dcl file loading?
dear sir,
same error againQuoteCommand: VPTone more attachments to be cont...
CMDECHO
Enter new value for CMDECHO <1>: 0
ACAD & Custom linetypes are loaded with General Layers!!
Select first corner of window opening:
Select opposite corner of window opening:
Scale list being loaded, Please be patient......
32 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
Command: *Cancel*
Command: *Cancel*
Command: <Switching to: Model>
Restoring cached viewports.
Command: mpl
Scale list being loaded, Please be patient......
mspace set.
0 scales added
My Scale List Begins....
; error: no function definition: SET_TILE_LIST
(command "ANNOTATIVEDWG" 0) ; Specifies whether or not the drawing will behave as an annotative block when inserted into another drawing - 0 = False
; 0 Nonannotative
; 1 Annotative
; Note The ANNOTATIVEDWG system variable becomes read-only if the drawing contains annotative objects.
; (princ "\n")
(command "ANNOAUTOSCALE" -4)
; Updates annotative objects to support the annotation scale when the annotation scale is changed.
; When the value is negative, the autoscale functionality is turned off, but the settings are maintained:
; 1 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are turned off, frozen, locked or that are set to Viewport > Freeze.
; -1 ANNOAUTOSCALE is turned off, but when turned back on is set to 1.
; 2 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are turned off, frozen, or that are set to Viewport > Freeze.
; -2 ANNOAUTOSCALE is turned off, but when turned back on is set to 2.
; 3 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are locked.
; -3 ANNOAUTOSCALE is turned off, but when turned back on is set to 3.
; 4 Adds the newly set annotation scale to all annotative objects that support the current scale.
; -4 ANNOAUTOSCALE is turned off, but when turned back on is set to 4.
(command "ANNOALLVISIBLE" 1) ; Hides or displays annotative objects that do not support the current annotation scale.
; The ANNOALLVISIBLE setting is saved individually for model space and each layout.
; Note When ANNOALLVISIBLE is set to 1, annotative objects that support more than one scale will only display one scale representation.
; 0 Only annotative objects that support the current annotation scale are displayed
; 1 All annotative objects are displayed
Check these variables in your drawing for me.Quote(command "ANNOTATIVEDWG" 0) ; Specifies whether or not the drawing will behave as an annotative block when inserted into another drawing - 0 = False
; 0 Nonannotative
; 1 Annotative
; Note The ANNOTATIVEDWG system variable becomes read-only if the drawing contains annotative objects.
; (princ "\n")
(command "ANNOAUTOSCALE" -4)
; Updates annotative objects to support the annotation scale when the annotation scale is changed.
; When the value is negative, the autoscale functionality is turned off, but the settings are maintained:
; 1 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are turned off, frozen, locked or that are set to Viewport > Freeze.
; -1 ANNOAUTOSCALE is turned off, but when turned back on is set to 1.
; 2 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are turned off, frozen, or that are set to Viewport > Freeze.
; -2 ANNOAUTOSCALE is turned off, but when turned back on is set to 2.
; 3 Adds the newly set annotation scale to annotative objects that support the current scale except for those on layers that are locked.
; -3 ANNOAUTOSCALE is turned off, but when turned back on is set to 3.
; 4 Adds the newly set annotation scale to all annotative objects that support the current scale.
; -4 ANNOAUTOSCALE is turned off, but when turned back on is set to 4.
(command "ANNOALLVISIBLE" 1) ; Hides or displays annotative objects that do not support the current annotation scale.
; The ANNOALLVISIBLE setting is saved individually for model space and each layout.
; Note When ANNOALLVISIBLE is set to 1, annotative objects that support more than one scale will only display one scale representation.
; 0 Only annotative objects that support the current annotation scale are displayed
; 1 All annotative objects are displayed
Command: ANNOAUTOSCALE
Enter new value for ANNOAUTOSCALE <-4>: *Cancel*
Command: ANNOALLVISIBLE
Enter new value for ANNOALLVISIBLE <1>: *Cancel*
Command: ANNOTATIVEDWG
Enter new value for ANNOTATIVEDWG <0>: *Cancel*