Author Topic: associate selected scale with dimscale ?  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

jlogan02

  • Bull Frog
  • Posts: 327
associate selected scale with dimscale ?
« on: November 24, 2020, 01:27:09 PM »

How do I associate the appropriate dimscale to the user selected drawing scale?


(if (scl selected associate it selection with
96, 48, 24, 16, 8 , 4 where these are a list


(vla-put-property en 'scalefactor 96))) except 96 is the list ??


Code - Auto/Visual Lisp: [Select]
  1.  
  2.  (setq scl (dos_listbox "Scaled TitleBlock" "Choose The Appropriate Drawing Scale"
  3.             '("1/8" "1/4" "1/2" "3/4" "1 1/2" "3")))
  4.  
  5.  (setq bdr1 (ssget "_X" '((2 . "TBLK_BORD_CTL" "TBLK_ATT_CTL"))))
  6.      (command "._scale" "ALL" "" "0,0" scl "")
  7.  


Also, when I try to use the drop down, see attached image, and select anything from the list I'm getting...
"[size=78%]  [/size]"
Not what I select
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

jlogan02

  • Bull Frog
  • Posts: 327
Re: associate selected scale with dimscale ?
« Reply #1 on: November 24, 2020, 03:00:05 PM »
The (setq scl.. with fractions is not going to work. That's making it scale using the fractions. Need to change that first.

Hold please...



How do I associate the appropriate dimscale to the user selected drawing scale?


(if (scl selected associate it selection with
96, 48, 24, 16, 8 , 4 where these are a list


(vla-put-property en 'scalefactor 96))) except 96 is the list ??


Code - Auto/Visual Lisp: [Select]
  1.  
  2.  (setq scl (dos_listbox "Scaled TitleBlock" "Choose The Appropriate Drawing Scale"
  3.             '("1/8" "1/4" "1/2" "3/4" "1 1/2" "3")))
  4.  
  5.  (setq bdr1 (ssget "_X" '((2 . "TBLK_BORD_CTL" "TBLK_ATT_CTL"))))
  6.      (command "._scale" "ALL" "" "0,0" scl "")
  7.  


Also, when I try to use the drop down, see attached image, and select anything from the list I'm getting...
"[size=78%]  [/size]"
Not what I select
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

jlogan02

  • Bull Frog
  • Posts: 327
Re: associate selected scale with dimscale ?
« Reply #2 on: November 24, 2020, 03:30:06 PM »
Update....

Removed fractions from listbox and added dimscale.
Added dimscale command with (scl as scale factor.

Still have the post HTML formatting issue. For now I'm just typing the HTML in. No matter what I select from the "Code" drop down it defaults to the HTML "size" doe.

Code - Auto/Visual Lisp: [Select]
  1. (setq scl (dos_listbox "Scaled TitleBlock" "Choose The Appropriate Scale"
  2.             '("96" "48" "24" "16" "8" "4")))
  3.  
  4.  ;;(setq bdr1 (ssget "_X" '((2 . "TBLK_BORD_CTL"))))
  5.      (command "._scale" "ALL" "" "0,0" scl )
  6.      (command "dimscale" scl)
  7.  
  8.      
  9.   (princ)
  10. )
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: associate selected scale with dimscale ?
« Reply #3 on: November 24, 2020, 03:37:05 PM »
I cannot reproduce the error in the code tags you have.

Have you tried removing the cookie data (for theSwamp)? Honestly, I don't think that will help because I don't think there is anything "in our cookie" but it might be worth a shot.
« Last Edit: November 24, 2020, 03:42:00 PM by John Kaul (Se7en) »
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

jlogan02

  • Bull Frog
  • Posts: 327
Re: associate selected scale with dimscale ?
« Reply #4 on: November 24, 2020, 03:41:50 PM »
Code - Auto/Visual Lisp: [Select]
  1. Got it to work.

In my profile settings under look and layout I had selected,  "Show WYSIWYG editor on post page by default".

Unchecked it and all is back to normal.
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: associate selected scale with dimscale ?
« Reply #5 on: November 24, 2020, 03:42:18 PM »
awesome!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org