Scale sensitivity not updating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-22 12:18 PM
I have a simple 2D object that I wish to be scale sensitive. However it does not update itself automatically when the drawing scale is changed. If I open the object dialogue dialogue box and close it, the object updates as I would expect it to, but it does not react to a change in drawing scale automatically as it should.
My question is. Has a setting been introduced that controls whether or not an object reacts to a scale change. If so what is it?
Thanks
Gary
Windows 7 Pro
Intel i7-2600
16GB RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-22 06:46 PM
Find any scale sensitive object and look for the GLOB_SCALE and implement in Your object.
Best Regards,
Piotr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-22 08:04 PM
Thanks
Gary
Windows 7 Pro
Intel i7-2600
16GB RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-22 09:44 PM
Could you post the object or the code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-23 04:16 AM
are you changing the scale of a drawing placed in a layout? if so the scale sensitivity will not work.
You need to change the scale in the saved view and rebuild the view to change the display
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-23 09:50 PM
No it is not in a layout. I am changing scale within the drawing view.
I will post the code tomorrow, and maybe put a video on YouTube to help clarify.
cheers
Gary
Windows 7 Pro
Intel i7-2600
16GB RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-24 12:14 PM
Master script -
!Minor scale increments
PARAMETERS scale_step = act_bar_wid*Draw_scale/10 !Width of main scale blocks
min_scal = scale_step/5 !Width of small scale increments in first block
If scale_step < 1 then txt_siz_mult = 1000 else txt_siz_mult = 1
And The 2D Script -
pen Fill_pen_2
While NFD < 5 Do
wid = min_scal
dep = min_scal
fill_type = gs_fill_type
fill_pen = Fill_pen_1
!GOTO 5
Gosub 10
Add2 0,-dep
fill_pen = Fill_pen_2
Gosub 10
Del 1
Add2 wid, 0
NFD = NFD+1
Mul2 1,-1
EndWhile
Hotspot2 0,0
NFD = 0
While NFD < 5 Do
wid = scale_step
dep = min_scal
fill_type = gs_fill_type
fill_pen = Fill_pen_1
Gosub 10
Add2 0,-dep
fill_pen = Fill_pen_2
Gosub 10
Del 1
Add2 wid, 0
NFD = NFD+1
Mul2 1,-1
Hotspot2 0,0
EndWhile
Del top
If lab_txt = 1 Then
Add2 0, -dep*1.5
txt_pos = 1
txt_val = "Scale 1:"+ str(Draw_scale, 3, 0)
Gosub 30
EndIf
Del top
!*******************
!Add distance values
NFD = 0
Add2 0,dep
While NFD <7 Do
txt_val = scale_step*NFD* txt_siz_mult
txt_pos = 8
Gosub 30
NFD = NFD+1
Add2 wid, 0
EndWhile
Del Top
End
!*****************************************************************************
10:
!Fill
fill fill_type
poly2_b 5,3,fill_pen, fill_pen,
0,0,1,
wid,0,1,
wid, dep,1,
0,dep,1,
0,0,-1
Hotline2 0, 0, wid, 0
Return
!*****************************************************************************
30:
!Label text
pen txt_pen
Define Style txt "Arial Western",txt_ht,txt_pos, 0
style txt
If V~ = 1 Then Mul2 -1,-1 !Correct text for mirrored object
TEXT2 0, 0, txt_val
Return
Windows 7 Pro
Intel i7-2600
16GB RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-24 12:16 PM
Sorry.
Windows 7 Pro
Intel i7-2600
16GB RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-24 03:07 PM
If Auto_scal = 1 Then
PARAMETERS Draw_scale = GLOB_SCALE
HIDEPARAMETER "Draw_scale"
Else
Values "Draw_scale" 2, 5, 10, 20, 50, 100, 200, 500, 1250
EndIf
!Minor scale increments
PARAMETERS scale_step = act_bar_wid*Draw_scale/10 !Width of main scale blocks
min_scal = scale_step/5 !Width of small scale increments in first block
If scale_step < 1 then txt_siz_mult = 1000 else txt_siz_mult = 1
I have put this video up on Youtube that shows the issue. When I change the view scale, the object remains unchanged until I open and close its dialogue box. This is the link -
I hope that helps and thank you all for your input.
Gary
Windows 7 Pro
Intel i7-2600
16GB RAM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2014-03-24 03:56 PM
Draw_scale = GLOB_SCALE
PARAMETERS Draw_scale = Draw_scale
Just setting the parameter does not actually set the variable value for use in the script - which is why you have to open the object so it can read the parameter value.
You will need to do the same for the 'scale_step' parameter as well.
Always set the parameter value first and then set the actual parameter.
i.e.
scale_step = act_bar_wid*Draw_scale/10
PARAMETERS scale_step = scale_step
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11