Author Topic: have a question about linetype scale  (Read 3546 times)

0 Members and 1 Guest are viewing this topic.

masao

  • Newt
  • Posts: 96
have a question about linetype scale
« on: October 08, 2023, 04:32:53 AM »
hi all, i have a questions.

question 1

the drawing have different linetype how to select all fix ltscale let them appear model space.(line,circle,lwpolyline,ellipse)
« Last Edit: December 21, 2023, 05:43:12 PM by masao »

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: have two questions linetype scale and ordinate back
« Reply #1 on: October 09, 2023, 11:35:09 PM »
Just select and in Properties set the LTscale. Depending on how your block is made it may not reflect the changes.
A man who never made a mistake never made anything

masao

  • Newt
  • Posts: 96
Re: have two questions linetype scale and ordinate back
« Reply #2 on: October 10, 2023, 02:37:35 AM »
Just select and in Properties set the LTscale. Depending on how your block is made it may not reflect the changes.

but different linetype and length change same LTscale have different result.have else code to change them LTscale?

masao

  • Newt
  • Posts: 96
Re: have a question about linetype scale
« Reply #3 on: December 21, 2023, 08:18:27 AM »
hi everyone,i want know how to judge it.

i must be use line length and circumference or diameter?

but lwpolyline and ellipse how to judge?

the drawing have different linetype how to select all fix ltscale let them appear model space.(line,circle,lwpolyline,ellipse)
« Last Edit: December 21, 2023, 05:44:31 PM by masao »

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: have a question about linetype scale
« Reply #4 on: December 21, 2023, 06:35:46 PM »
If your using the std linetypes Acad & Acadiso.lin you can set a LTSCALE that suits you, the difference between the 2 .lin files is one is imperial the other is Metric. If you have custom line types then you can edit the values in those linetypes to suit an appearance that you want. We had linetypes based on true measurement at Ltscale = 1. eg a 600 spaced dash.

Dont forget PSltscale for your layouts.

In your dwg you used 4 different linetypes at different scales, so how do you compare ?

Some of the line types may need a different scale. If you open a .lin file you will see all the values involved. I would look at your values say for AM_ISO02W050x2 and edit them to better suit, it looks like a custom linetype.
« Last Edit: December 21, 2023, 06:43:18 PM by BIGAL »
A man who never made a mistake never made anything

masao

  • Newt
  • Posts: 96
Re: have a question about linetype scale
« Reply #5 on: December 22, 2023, 08:42:19 AM »
If your using the std linetypes Acad & Acadiso.lin you can set a LTSCALE that suits you, the difference between the 2 .lin files is one is imperial the other is Metric. If you have custom line types then you can edit the values in those linetypes to suit an appearance that you want. We had linetypes based on true measurement at Ltscale = 1. eg a 600 spaced dash.

Dont forget PSltscale for your layouts.

In your dwg you used 4 different linetypes at different scales, so how do you compare ?

Some of the line types may need a different scale. If you open a .lin file you will see all the values involved. I would look at your values say for AM_ISO02W050x2 and edit them to better suit, it looks like a custom linetype.

I just use on model.

1.select 2.repeat select if hidden center divide... 3.if hidden enter hidden setting 4. use object length to fix ltscale 5. then next object....

This function is already have , but not code. I want know how to do it.

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: have a question about linetype scale
« Reply #6 on: December 23, 2023, 06:42:03 PM »
Using Vl is probably easiest as look at 2 properties
;   Linetype = "DASHED"
;   LinetypeScale = 2.5

You can change both of these, you can also get the length of an object just be aware for a Circle it is "Cicumference" others "length" should work.

Code: [Select]
(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
(setq lt (vlax-get obj 'Linetype))
(setq sc (vlax-get obj 'LinetypeScale))
(if (= (vlax-get obj 'Objectname) "AcDbCircle")
(setq len (vlax-get obj 'Circumference))
(setq len (vlax-get obj 'Length))
; do your thing here use PUT to change value
)
A man who never made a mistake never made anything

masao

  • Newt
  • Posts: 96
Re: have a question about linetype scale
« Reply #7 on: December 24, 2023, 03:18:37 AM »
Using Vl is probably easiest as look at 2 properties
;   Linetype = "DASHED"
;   LinetypeScale = 2.5

You can change both of these, you can also get the length of an object just be aware for a Circle it is "Cicumference" others "length" should work.

Code: [Select]
(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
(setq lt (vlax-get obj 'Linetype))
(setq sc (vlax-get obj 'LinetypeScale))
(if (= (vlax-get obj 'Objectname) "AcDbCircle")
(setq len (vlax-get obj 'Circumference))
(setq len (vlax-get obj 'Length))
; do your thing here use PUT to change value
)

if i use this to setting , must be set many cond. have else better code?

------------------------------------------------>
    (cond ((and (> len 0) (<= len 2))
    (setq leg 2)
   )
   ((and (> len 2) (<= len 5))
    (setq leg 2.5)
   )
   ((and (> len 5) (<= len 50))
    (setq leg 4)
   )
   ((and (> len 50) (<= len 120))
    (setq leg 15)
   )
   ((and (> len 120) (<= len 1000))
    (setq leg 20)
   )
   ((and (> len 1000) (<= len 1500))
    (setq leg 40)
   )
   ((and (> len 1500) (<= len 2500))
    (setq leg 80)
   )
    )     ;end cond
    (setq sca (/ leg scale lts 10))

(command "change" nam "" "p" "s" SCA "")
-------------------------------------------------->
lts is ltscale.
scale is setting numerical value by myself.
use repeat to change ltscale.

different linetype and linetype 2 or X2 must be use different setting.
and if the drawing had linetype ,how to know it is inch or mm?
This will also affect ltscale too.
« Last Edit: December 24, 2023, 10:57:52 AM by masao »