TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: FELIX on June 26, 2020, 10:00:17 PM

Title: list property added to AECC-COGO_POINT
Post by: FELIX on June 26, 2020, 10:00:17 PM
How to list the values of a property added to the AECC-COGO_POINT?
Title: Re: list property added to AECC-COGO_POINT
Post by: Dilan on June 27, 2020, 04:53:46 PM
How to list the values of a property added to the AECC-COGO_POINT?
Hi, maybe like this:
Code: [Select]
(defun cogo_list_Collect ( ss / i l o ss )
(repeat (setq i (sslength ss))
            (setq i (1- i)
                  o (vlax-ename->vla-object (ssname ss i))
                  l (cons (mapcar '(lambda ( p ) (vlax-get o p)) '(easting northing elevation)) l)
            )
        )
     l
)
Example:
Code: [Select]
(cogo_list_Collect (ssget '((0 . "AECC_COGO_POINT"))))
Title: Re: list property added to AECC-COGO_POINT
Post by: FELIX on June 27, 2020, 06:25:41 PM
Dilan, these are not properties (easting northing elevation). These are the ones that have been added (Sigma E, Sigma N, Sigma Z), see the attached drawing.
Title: Re: list property added to AECC-COGO_POINT
Post by: Dilan on June 27, 2020, 10:55:53 PM
Dilan, these are not properties (easting northing elevation). These are the ones that have been added (Sigma E, Sigma N, Sigma Z), see the attached drawing.
I have no such properties in civil
Title: Re: list property added to AECC-COGO_POINT
Post by: BIGAL on June 28, 2020, 12:28:13 AM
You will need to change your CIV3D style to display sigmas, or do you want to get the aecc point details for some thing else.

There are various ways but bottom line is get properties of a Aecc point the issue is the sigmas may be in a separate area but linked via pt number. Need sample dwg.
Title: Re: list property added to AECC-COGO_POINT
Post by: wizman on June 28, 2020, 01:26:03 AM
Export Points > Create a point file format of using user defined properties. e.g. PEDSeSnSz
Title: Re: list property added to AECC-COGO_POINT
Post by: FELIX on June 28, 2020, 10:28:28 AM
Dilan, these are not properties (easting northing elevation). These are the ones that have been added (Sigma E, Sigma N, Sigma Z), see the attached drawing.
I have no such properties in civil

see the DWG file I attached.
Title: Re: list property added to AECC-COGO_POINT
Post by: FELIX on June 28, 2020, 10:37:52 AM
You will need to change your CIV3D style to display sigmas, or do you want to get the aecc point details for some thing else.

There are various ways but bottom line is get properties of a Aecc point the issue is the sigmas may be in a separate area but linked via pt number. Need sample dwg.

see the DWG file I attached.

It already contains a point with the style added by SIGMAS.

The function "(vlax-dump-object (vlax-ename-> vla-object ENTTS) T)" does not list SIGMAS as a property in Civil 3D but the AutoCAD command "LIST" does.

What I need is a LISP that reads these values. In this case of the drawing I have attached are 3 SIGMAs

SIGMAS are just a small test. Various other information will be added to the point in Civel 3D.
Title: Re: list property added to AECC-COGO_POINT
Post by: FELIX on June 28, 2020, 10:40:48 AM
Export Points > Create a point file format of using user defined properties. e.g. PEDSeSnSz

What I need is a LISP that reads these values. In this case of the drawing I have attached are 3 SIGMAs
Title: Re: list property added to AECC-COGO_POINT
Post by: wizman on June 28, 2020, 02:34:39 PM
Set the point group classification to Sigmas or All.  In your dwg, it is set to none.


Then to read the UDP's:

Code - Auto/Visual Lisp: [Select]
  1. (setq wiz (vlax-ename->vla-object (car (entsel "\nPick a point: "))))
  2. (foreach x '("Sigma E" "Sigma N" "Sigma Z")
  3. (princ (strcat "\n"(vlax-invoke wiz 'GetUserDefinedPropertyValue x))))



EDIT (John): Added code tags.
Title: Re: list property added to AECC-COGO_POINT
Post by: FELIX on June 28, 2020, 05:49:17 PM
Set the point group classification to Sigmas or All.  In your dwg, it is set to none.


Then to read the UDP's:

Code - Auto/Visual Lisp: [Select]
  1. (setq wiz (vlax-ename->vla-object (car (entsel "\nPick a point: "))))
  2. (foreach x '("Sigma E" "Sigma N" "Sigma Z")
  3. (princ (strcat "\n"(vlax-invoke wiz 'GetUserDefinedPropertyValue x))))

EDIT (John): Added code tags.


PERFECT, EXCELLENT, THANK YOU.
Title: Re: list property added to AECC-COGO_POINT
Post by: wizman on June 29, 2020, 12:16:12 AM
PERFECT, EXCELLENT, THANK YOU.


glad to help, cheers.