Author Topic: C3D Point access  (Read 3699 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
C3D Point access
« on: April 21, 2006, 02:44:31 PM »
Since C3D now uses dynamic blocks for its points I'm at a loss on how to get access to them or they data. What I need to extract, for now, is the elevation of a given point. I would like to use entget and entsel if possible but I have no idea where to start.

Below is the output of  entget on a given point.
Code: [Select]
(
   (-1 . <Entity name: 7ed65078>)
    (0 . "AECC_POINT_GROUP")
    (330 . <Entity name: 7ef9dcf8>)
    (5 . "47F")
    (100 . "AcDbEntity")
    (67 . 0)
    (410 . "Model")
    (8 . "0")
    (100 . "AecDbEntity")
    (102 . "{AEC_SUBOBJECT")
    (300 . "AeccImpAllPointsGroup")
    (100 . "AecImpObj")
    (3 . "")
    (100 . "AecImpEnt")
    (171 . 0)
    (100 . "AeccImpEnt")
    (102 . "AEC_SUBOBJECT}")
    (102 . "{AEC_NULLOBJECT}")
    (100 . "AeccDbEntity")
    (100 . "AeccDbPointGroup")
  )
TheSwamp.org  (serving the CAD community since 2003)

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: C3D Point access
« Reply #1 on: April 21, 2006, 02:53:30 PM »
You mean AutoCad 2006 or 2007?

LE

  • Guest
Re: C3D Point access
« Reply #2 on: April 21, 2006, 02:56:04 PM »
Does not say much that list.... is there a way to convert the ename into vla object, and from there do a vlax-dump-object to view all the properties and methods that point have?

Sorry I'm still in vanilla acad and on version 2005

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C3D Point access
« Reply #3 on: April 21, 2006, 03:00:40 PM »
Quote from: ElpanovEvgeniy
You mean AutoCad 2006 or 2007?
I'm on Civil 3D 2006 at the moment.

Quote from: LE
is there a way to convert the ename into vla object, and from there do a vlax-dump-object to view all the properties and methods that point have?

I'll do that Luis, that appears to be the only way.

[ http://discussion.autodesk.com/thread.jspa?threadID=398829 ]
Quote from: autodesk news groups
Reply From:  Peter Funk - Autodesk, Inc.
Date: Apr/21/05 - 15:17 (GMT)
   Reply
          Re: LISP access to ACAD proxy objects?
Map 3D and Civil 3D share the Civil Point object, and both have API access
to those objects. These are the only Autodesk products that you will have
access to the point information. There is no access to the information when
the points are in a proxy state (there are no DXF properties for those
objects).

Cheers,

Peter Funk
Autodesk, Inc.
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C3D Point access
« Reply #4 on: April 21, 2006, 03:03:45 PM »
Here is the dump on the vla object.

Code: [Select]
Pick Object...; IAeccPointGroup: IAeccPointGroup Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAeccApplication 0e644bb0>
;   Description = ""
;   DisplayName (RO) = "_All Points"
;   Document (RO) = #<VLA-OBJECT IAeccDocument 0e644680>
;   Elevation = 0.0
;   Handle (RO) = "47F"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0e6447b4>
;   Layer = "0"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Name = "_All Points"
;   ObjectID (RO) = 2127974520
;   ObjectName (RO) = "AeccDbPointGroup"
;   OverrideElevation = 0
;   OverridePointLabelStyle = 0
;   OverridePointStyle = 0
;   OverrideRawDescription = 0
;   OwnerID (RO) = 2130304248
;   PlotStyleName = "ByLayer"
;   PointCount (RO) = 2
;   PointLabelStyle = #<VLA-OBJECT IAeccLabelStyle 0e645240>
;   Points (RO) = (1 2)
;   PointStyle = #<VLA-OBJECT IAeccPointStyle 0e6451f0>
;   QueryBuilder (RO) = Exception occurred
;   RawDescription = ""
;   SelectedPointConvergence (RO) = Exception occurred
;   SelectedPointEasting (RO) = Exception occurred
;   SelectedPointElevation (RO) = Exception occurred
;   SelectedPointFullDescription (RO) = Exception occurred
;   SelectedPointGridEasting (RO) = Exception occurred
;   SelectedPointGridNorthing (RO) = Exception occurred
;   SelectedPointLabelStyle (RO) = Exception occurred
;   SelectedPointLatitude (RO) = Exception occurred
;   SelectedPointLayer (RO) = Exception occurred
;   SelectedPointLongitude (RO) = Exception occurred
;   SelectedPointName (RO) = Exception occurred
;   SelectedPointNorthing (RO) = Exception occurred
;   SelectedPointNumber (RO) = Exception occurred
;   SelectedPointRawDescription (RO) = Exception occurred
;   SelectedPointScale (RO) = Exception occurred
;   SelectedPointStyle (RO) = Exception occurred
;   ShowToolTip = -1
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 0e644440>
;   Visible = -1
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   ContainsPoint (1)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()
TheSwamp.org  (serving the CAD community since 2003)

LE

  • Guest
Re: C3D Point access
« Reply #5 on: April 21, 2006, 03:12:28 PM »
Hmm...

Mark;

Appears that is no way to access that data via activex too....

It is some how a way to know how to get the value of the ContainsPoint method?... just guessing  :-(

As what they being saying some of the new objects are only available via .NET[in here I'm not sure since there still not possible to create custom objects via C#] or maybe from ARX....  :-(

LE

  • Guest
Re: C3D Point access
« Reply #6 on: April 21, 2006, 03:19:36 PM »
I see it is needed a COM API.... nope, no idea ---- maybe in the dark side [vba] will be your best try...

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C3D Point access
« Reply #7 on: April 21, 2006, 03:21:50 PM »
Hmm...

Mark;

Appears that is no way to access that data via activex too....

It is some how a way to know how to get the value of the ContainsPoint method?... just guessing  :-(

As what they being saying some of the new objects are only available via .NET[in here I'm not sure since there still not possible to create custom objects via C#] or maybe from ARX....  :-(

I don't know Luis, I'm lost at the moment. :-) 
TheSwamp.org  (serving the CAD community since 2003)

Jeff_M

  • King Gator
  • Posts: 4097
  • C3D user & customizer
Re: C3D Point access
« Reply #8 on: April 21, 2006, 05:31:13 PM »
Mark,
Even though I promised to not code C3D in lisp, here is an example to do what you want....  :evil:
Code: [Select]
(setq C3D (vla-getinterfaceobject (vlax-get-acad-object) "AeccXUiLand.AeccApplication"))
(setq C3Ddoc (vla-get-activedocument C3D))
(setq pnts (vlax-get C3Ddoc 'points))
;;ask to select points
(princ "\nSelect points to query the elevations of: ")
(setq selectedPnts (vlax-invoke C3Ddoc 'SelectPoints))
(foreach pnt selectedPnts
  (setq elev (vlax-get (vlax-invoke pnts 'find pnt) 'elevation))
  (princ (strcat "\nElevation of Pt#" (itoa pnt) " = " (rtos elev 2 2)))
  )

(mapcar 'vlax-release-object (list pnts C3Ddoc C3D))

Jeff_M

  • King Gator
  • Posts: 4097
  • C3D user & customizer
Re: C3D Point access
« Reply #9 on: April 21, 2006, 06:18:59 PM »
Or, to select one at a time........
Code: [Select]
(princ "\nSelect point to query the elevations of: ")
(setq pntSel (ssget ":S" '((0 . "AECC_POINT_GROUP"))))
(setq pntGrp (vlax-ename->vla-object (ssname pntsel 0)))
(princ (strcat "\nPt#"
       (vlax-get pntGrp 'SelectedPointNumber)
       " elevation = "
       (vlax-get pntGrp 'SelectedPointElevation)
       )
       )

Edit: added Pt# to listing
« Last Edit: April 21, 2006, 06:39:50 PM by Jeff_M »

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C3D Point access
« Reply #10 on: April 21, 2006, 08:04:34 PM »
Thank Jeff, you da man...........  :-)

"AeccXUiLand.AeccApplication" that's the pesky rascal I was looking for. The docs were no help at all, at least not for me. If you click on that object in the .chm file it takes you to the alignments, or mine did anyway. *sigh*

thanks again Jeff, big help!
TheSwamp.org  (serving the CAD community since 2003)