Author Topic: entmod Sectionobject - add the Destinationfile  (Read 257 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 501
entmod Sectionobject - add the Destinationfile
« on: February 12, 2018, 11:19:04 AM »
(Bricscad 18)

With entmake I created a SECTIONOBJECT - works fine
In code 360 "Section_Settings" I modified the code 1 ("SectionTypeSettings) with the additional "DestinationFile" - a full path.

The problem is:
- entmod returns the code and not nil. This looks great, but nevertheless it does not work.
- When I add the path via the "Properties", it works fine.

This is the code of my non working "entmod":
Code - Auto/Visual Lisp: [Select]
  1. ((-1 . <Entity name: 7ede9360>) (0 . "SECTION_SETTINGS") (5 . "43B") (330 . <Entity name: 7eddd0a0>) (100 . "AcDbSectionSettings") (90 . 2) (91 . 0) (1 . "SectionTypeSettings") (90 . 2) (91 . 17) (92 . 0) (1 . "D:\\bim-tutorial-files\\BIM tutorial files\\haalo2.dwg") (93 . 0) (3 . "SectionTypeSettingsEnd"))
This is the code after editing with "Properties":
Code - Auto/Visual Lisp: [Select]
  1. ((-1 . <Entity name: 7ede9360>) (0 . "SECTION_SETTINGS") (5 . "43B") (330 . <Entity name: 7eddd0a0>) (100 . "AcDbSectionSettings") (90 . 2) (91 . 1) (1 . "SectionTypeSettings") (90 . 2) (91 . 17) (92 . 0) (1 . "D:\\bim-tutorial-files\\BIM tutorial files\\vorher.dwg") (93 . 0) (3 . "SectionTypeSettingsEnd"))
Where is the difference or where is the problem? (The different filenames are intended)
« Last Edit: February 12, 2018, 02:17:34 PM by Peter2 »
Peter

AutoCAD 2016 - 2018 German (so some technical terms will be badly retranslated to English)
Civil 3D 2017 - 2018

Dlanor

  • Newt
  • Posts: 91
Re: entmod Sectionobject - add the Destinationfile
« Reply #1 on: February 12, 2018, 03:01:00 PM »
This is the code of my non working "entmod":
Code - Auto/Visual Lisp: [Select]
  1. ((-1 . <Entity name: 7ede9360>) (0 . "SECTION_SETTINGS") (5 . "43B") (330 . <Entity name: 7eddd0a0>) (100 . "AcDbSectionSettings") (90 . 2) (91 . 0) (1 . "SectionTypeSettings") (90 . 2) (91 . 17) (92 . 0) (1 . "D:\\bim-tutorial-files\\BIM tutorial files\\haalo2.dwg") (93 . 0) (3 . "SectionTypeSettingsEnd"))
This is the code after editing with "Properties":
Code - Auto/Visual Lisp: [Select]
  1. ((-1 . <Entity name: 7ede9360>) (0 . "SECTION_SETTINGS") (5 . "43B") (330 . <Entity name: 7eddd0a0>) (100 . "AcDbSectionSettings") (90 . 2) (91 . 1) (1 . "SectionTypeSettings") (90 . 2) (91 . 17) (92 . 0) (1 . "D:\\bim-tutorial-files\\BIM tutorial files\\vorher.dwg") (93 . 0) (3 . "SectionTypeSettingsEnd"))
Where is the difference or where is the problem? (The different filenames are intended)

I don't know it's relevance but the first dotted pair shown below is different

This is the code of my non working "entmod":
Code - Auto/Visual Lisp: [Select]
  1. (91 . 0) (1 . "SectionTypeSettings")

This is the code after editing with "Properties":
Code - Auto/Visual Lisp: [Select]
  1. (91 . 1) (1 . "SectionTypeSettings"))

tschüss

Peter2

  • Swamp Rat
  • Posts: 501
Re: entmod Sectionobject - add the Destinationfile
« Reply #2 on: February 12, 2018, 03:20:15 PM »
Hi Dlanor

thanks, I will take a look, but I suppose it has nothing to do with it.

In the meantime I created an ActiveX code; the first test seem to work (although the Section_Settings are a little bit mysterious for me)

Code - Auto/Visual Lisp: [Select]
  1.    (if (eq "SECTIONOBJECT" (cdr (assoc 0 (entget (entlast)))))
  2.        (progn
  3.            (setq settings_objekt (vlax-ename->vla-object (cdr (assoc 360 (entget (entlast))))))
  4.            (setq settings_objekt_methods (vlax-invoke-method settings_objekt "Getsectiontypesettings" acSectionType2dSection))
  5.            (vlax-put-property settings_objekt_methods "Destinationfile" (strcat (getvar "DWGPREFIX") name  ".dwg"))
  6.        )
  7.    )
Peter

AutoCAD 2016 - 2018 German (so some technical terms will be badly retranslated to English)
Civil 3D 2017 - 2018

Dlanor

  • Newt
  • Posts: 91
Re: entmod Sectionobject - add the Destinationfile
« Reply #3 on: February 13, 2018, 02:51:06 AM »
thanks, I will take a look, but I suppose it has nothing to do with it.

Its position outside the section settings suggests that it is a flag of some sort so may well be relevant.


although the Section_Settings are a little bit mysterious for me

http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-8B60CBAB-B226-4A5F-ABB1-46FD8AABB928