autoLisp linetype change not functioning properly

autoLisp linetype change not functioning properly

SPORTE0000
Contributor Contributor
661 Views
1 Reply
Message 1 of 2

autoLisp linetype change not functioning properly

SPORTE0000
Contributor
Contributor

So I've been using the code below to try to test out changing the line type of a line.  The issue is that when its changed you can't see the switch.  For example if i switch it to "HIDDEN," the line in question continues to look continuous.  So my question is what setting is off that is causing this currently i did a dump on it  which i will also add below.

 

 

I'm assuming that its something simple like thickness or ltscale, but attempts to see the change on my own have failed mostly.  I'm currently using ACADE 2015.

 

 

Command: LINE
Specify first point:
Specify next point or [Undo]:
Specify next point or [Undo]: *Cancel*
Command: AHL
Pick an object:
Pick an object: *Cancel*
; error: Function cancelled
Command:
Command: *Cancel*
Command: DUMP
Select object: ; IAcadLine: AutoCAD Line Interface
; Property values:
;   Angle (RO) = 0.472449
;   Application (RO) = #<VLA-OBJECT IAcadApplication 000000013fb3a130>
;   Delta (RO) = (1.27062 0.649349 0.0)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000000357cd348>
;   EndPoint = (7.91115 3.33805 0.0)
;   EntityTransparency = "ByLayer"
;   Handle (RO) = "104F0"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0000000055656278>
;   Layer = "0"
;   Length (RO) = 1.42693
;   Linetype = "HIDDEN"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 47
;   ObjectName (RO) = "AcDbLine"
;   OwnerID (RO) = 43
;   PlotStyleName = "ByLayer"
;   StartPoint = (6.64054 2.6887 0.0)
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 0000000055520f50>
;   Visible = -1
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Offset (1)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()
Command:
Command:
Command:
Command: _copyclip

 

 

 

(defun c:AHL ()
 (vl-load-com); Load activeX support
  
 (apply_hidden_linetype); call command
  
 (princ); quiet exit
)


(defun apply_hidden_linetype (/ ent pbj)

 (setvar "cmdecho" 0); disable command echo

 ; if hidden linetype is not exist, load it
 (if (null (tblsearch "ltype" "hidden"))  
  (command ".linetype" "load" "hidden" "acad.lin" "")
 )

 ; loop until user picks nil object or just press enter
 (while (setq ent (entsel "\nPick an object: "))
  (setq obj (vlax-ename->vla-object (car ent)))   ; convert to ActivX object

  (if (vlax-property-available-p obj 'linetype t) ; verify that an object has a linetype property
   (vlax-put-property obj 'linetype "hidden")   ; set hidden linetype
  )
 )

 (setvar "cmdecho" 1); restore command echo
)

Untitled.png

 

0 Likes
662 Views
1 Reply
Reply (1)
Message 2 of 2

cadffm
Consultant
Consultant
Linetypescale of Object
Ltscale Sysvar
(PSltscale / only for Paperspace-Layouts)
Msltscale / and annotativ scales
Plotstyle if displayed (pagesetup checkbox upper right corner)

And: Linetypedefinition british and metric are different by factor 25.4)

Thats not a Lisp question so long you can not handle it manually.

Sebastian

0 Likes