Author Topic: entmake SECTIONOBJECT - DXF62 does not work  (Read 2048 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 653
entmake SECTIONOBJECT - DXF62 does not work
« on: February 08, 2018, 11:50:32 AM »
This code (nearly) works for me:

Code: [Select]
(entmake
            (list
                '(0 . "SECTIONOBJECT")
                '(100 . "AcDbEntity")
                '(100 . "AcDbSection")
                '(67 . 0)   
                '(410 . "Model")
                '(8 . "Schnitt")    ; Layer
                '(90 . 1)    ; 1=Ebene
                '(91 . 5)    ; 1=Liveschnitt; 5=verkehrter Blick
                '(1 . "v1")    ; Name
;                '(10 0.0 -1.0 0.0)   ; vertikale Richtung für hor. Schnitte
               '(10 0.0 0.0 -1.0)   ; vertikale Richtung für vertikale Schnitte
                '(40 . 10)      ; Höhe oben = rechts von der Basislinie
                '(41 . 5)      ; Höhe unten = links von der Basislinie
                '(70 . 5)           ; Transparenz
                '(62 . 1)        ; Farbe rot
                '(92 . 2)                ; Anzahl Scheitelpunkte
                                         ; Kontrollpunkte für Hinterlinien (wiederholt für Anzahl der Kontrollpunkte für Hinterlinien);
                '(11 -5 3 2)  ; Z= SchnitthöheStartpunkt der Basislinie
                '(11 5 3 2)   ; Zielpunkt der Basislinie
;                 '(93 . 0)
            )
        )
The only thing that does nearly nothing - no result, no error - is DXF 62 with value 1 (red).
Only the "baseline" of the sectionobject is created in red, the "area" of the object is always created in standard-color grey (colour 9).

Any ideas where the problem is?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #1 on: February 08, 2018, 12:03:29 PM »
Try this:
Code: [Select]
(entmake
'(
(0 . "SECTIONOBJECT")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "zDtl xLight 3")
(62 . 1)
(100 . "AcDbSection")
(90 . 1)
(91 . 1)
(1 . "v1")
(10 0.0 0.0 -1.0)
(40 . 10.0)
(41 . 5.0)
(70 . 5)
(62 . 1)
(92 . 2)
(11 -5.0 3.0 2.0)
(11 5.0 3.0 2.0)
(93 . 0)
))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #2 on: February 08, 2018, 02:08:20 PM »
But section object is designed as line which is movable... So when you change color to it, that entity is changed... You can't affect default fill color of sections - they are always grey...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Peter2

  • Swamp Rat
  • Posts: 653
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #3 on: February 08, 2018, 04:44:02 PM »
@CAB
thanks, I will try tomorrow.

...You can't affect default fill color of sections - they are always grey...
But the colour can be changed manually after creation. Maybe that's the only way?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Peter2

  • Swamp Rat
  • Posts: 653
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #4 on: February 09, 2018, 03:32:48 AM »
Try this:...
:-( As ribarm already noted - it does not work.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Peter2

  • Swamp Rat
  • Posts: 653
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #5 on: February 09, 2018, 09:48:04 AM »
Hmm - Bricscad accept the following code and creates a green "base-line" and a red "area"; AutoCAD ignores the color of the area:

Code - Auto/Visual Lisp: [Select]
  1.             (list
  2.                 '(0 . "SECTIONOBJECT")
  3.                 '(100 . "AcDbEntity")
  4.                 '(67 . 0)  
  5.                 '(410 . "Model")
  6.                 '(8 . "0")    ; Layer
  7.                 '(62 . 3)       ; Farbe der Linie
  8.                  '(6 . "DASHED")
  9.                 '(370 . 100) ; Linienstärke
  10.  
  11.                 ; dieser 100er muss er nach den Eigenschaften der Linie kommen
  12.                 '(100 . "AcDbSection")
  13.                 '(90 . 1)    ; 1=Ebene
  14.                 (cons 91 0)    ; 1=Liveschnitt; 5=verkehrter Blick
  15.                 ;(cons 91 code_91)    ; 1=Liveschnitt; 5=verkehrter Blick
  16.                 (cons 1 name)    ; Name
  17.                  (cons 10 code_10)
  18.                 (cons 40  code_40)      ; Höhe oben = rechts von der Basislinie
  19.                 (cons 41  code_41)      ; Höhe unten = links von der Basislinie
  20.                 '(70 . 5)           ; Transparenz
  21.                 '(92 . 2)                ; Anzahl Scheitelpunkte
  22.                 (cons 11 code_11a)  ; Z= SchnitthöheStartpunkt der Basislinie
  23.                 (cons 11 code_11e)   ; Zielpunkt der Basislinie
  24.                 '(62 . 1)        ; Farbe rot
  25.             )
  26.     )
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Peter2

  • Swamp Rat
  • Posts: 653
Re: entmake SECTIONOBJECT - DXF62 does not work
« Reply #6 on: February 26, 2018, 02:54:49 AM »
Here is a current blog from Autodesk Dev Blog, which confirms that is does not work in pure Lisp, but works with ActiveX

http://adndevblog.typepad.com/autocad/2018/02/create-section-object-using-vlisp.html

Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23