Kowal Posted May 23, 2017 Share Posted May 23, 2017 How to get a area of Material Section Material Section is an object existing only in Civil 3D. I am looking for the properties using: (defun c:prop (/ p1 p2) (vl-load-com) (setq p1 (vlax-ename->vla-object (car (entsel)))) (setq p2 (vlax-get-property p1 "Parent")) .... (vlax-dump-object p2 'T) (princ) ) I can not find this property (area). The property is displayed in the window. This is shown in the image. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 24, 2017 Share Posted May 24, 2017 Some things like Area are calculated it may be using the vertices to work out the area. Does it have "Coordinates" in dump? Quote Link to comment Share on other sites More sharing options...
Kowal Posted May 24, 2017 Author Share Posted May 24, 2017 I can not find information about the area or coordinates. I'm looking so. You have some ideas. (setq obj (vlax-Ename->Vla-Object (car (entsel)))) (vlax-dump-object obj 'T) Return ; Property values: ; Application (RO) = # ; DataType = 5 ; Description = "" ; DisplayName (RO) = "SL Collection - 1 - 0+020.00 - Material List - (2) - Ground Fill(181)" ; Document (RO) = # ; ElevationMax (RO) = 112.042 ; ElevationMin (RO) = 104.316 ; EntityTransparency = "ByLayer" ; Handle (RO) = "6692" ; HasExtensionDictionary (RO) = 0 ; Hyperlinks (RO) = # ; LabelGroups (RO) = ...Indexed contents not shown... ; Layer = "C-ROAD-SHAP" ; LengthLeft (RO) = -34.7016 ; LengthRight (RO) = 14.3699 ; Linetype = "ByLayer" ; LinetypeScale = 1.0 ; Lineweight = -1 ; Links (RO) = # ; MappingName (RO) = "Material List - (2)" ; Material = "ByLayer" ; MaterialName (RO) = "Ground Fill" ; Name = "SL Collection - 1 - 0+020.00 - Material List - (2) - Ground Fill(181)" ; ObjectID (RO) = 43 ; ObjectID32 (RO) = 43 ; ObjectName (RO) = "AeccDbMaterialSection" ; OwnerID (RO) = 78 ; OwnerID32 (RO) = 78 ; Parent (RO) = # ; PlotStyleName = "ByLayer" ; ShowToolTip = -1 ; StaticDynamic = 1 ; Station (RO) = 20.0 ; Style = Civil 3D API: Taki interfejs nie jest obsługiwany. ; StyleName (RO) = "Fill Material" ; Surface (RO) = nil ; TrueColor = # ; Visible = -1 ; Methods supported: ; ArrayPolar (3) ; ArrayRectangular (6) ; Copy () ; Delete () ; ElevationAt (1) ; GetBoundingBox (2) ; GetExtensionDictionary () ; GetXData (3) ; Highlight (1) ; IntersectWith (2) ; IsReferenceObject () ; IsReferenceStale () ; IsReferenceSubObject () ; IsReferenceValid () ; Mirror (2) ; Mirror3D (3) ; Move (2) ; Rotate (2) ; Rotate3D (3) ; ScaleEntity (2) ; SetXData (2) ; TransformBy (1) ; Update () (setq obj (vlax-Ename->Vla-Object (car (entsel)))) (setq e1 (vlax-get-property obj "Parent")) (vlax-dump-object e1 'T) Return ; Property values: ; Application (RO) = # ; Description = "" ; DisplayName (RO) = "0+020.00" ; Document (RO) = # ; EntityTransparency = "ByLayer" ; Handle (RO) = "65DE" ; HasExtensionDictionary (RO) = 0 ; Hyperlinks (RO) = # ; LabelStyle = Wystąpił wyjątek ; Layer = "C-ROAD-SAMP" ; Linetype = "ByLayer" ; LinetypeScale = 1.0 ; Lineweight = -1 ; LockToStation = -1 ; Material = "ByLayer" ; Name = "0+020.00" ; ObjectID (RO) = 86 ; ObjectID32 (RO) = 86 ; ObjectName (RO) = "AeccDbSampleLine" ; OwnerID (RO) = 78 ; OwnerID32 (RO) = 78 ; Parent (RO) = # ; PlotStyleName = "ByLayer" ; Sections (RO) = # ; SectionViews (RO) = # ; ShowToolTip = -1 ; Station = 20.0 ; Style = # ; StyleName (RO) = "Road Sample Line" ; TrueColor = # ; Vertices (RO) = # ; Visible = -1 ; Methods supported: ; ArrayPolar (3) ; ArrayRectangular (6) ; Copy () ; Delete () ; GetBoundingBox (2) ; GetExtensionDictionary () ; GetXData (3) ; Highlight (1) ; IntersectWith (2) ; IsReferenceObject () ; IsReferenceStale () ; IsReferenceSubObject () ; IsReferenceValid () ; Mirror (2) ; Mirror3D (3) ; Move (2) ; Rotate (2) ; Rotate3D (3) ; ScaleEntity (2) ; SetXData (2) ; TransformBy (1) ; Update () (setq obj (vlax-Ename->Vla-Object (car (entsel)))) (setq e1 (vlax-get-property obj "Parent")) (setq e2 (vlax-get-property e1 "Vertices")) (vlax-dump-object e2 'T) Return ; Property values: ; Count (RO) = 2 ; CountLeft (RO) = 1 ; CountRight (RO) = 1 ; Methods supported: ; Add (3) ; Insert (4) ; Item (1) ; Remove (1) Quote Link to comment Share on other sites More sharing options...
Kowal Posted May 24, 2017 Author Share Posted May 24, 2017 I just found the coordinates the aligment setq obj (vlax-Ename->Vla-Object (car (entsel)))) (setq e1 (vlax-get-property obj "Parent")) (setq e2 (vlax-get-property e1 "Parent")) (setq e3 (vlax-get-property e2 "Parent")) (print (vlax-get (vlax-invoke-method e3 'GetLWPolyline) 'Coordinates)) Return (6742.69 3985.73 6889.64 4121.41) Quote Link to comment Share on other sites More sharing options...
Kowal Posted May 24, 2017 Author Share Posted May 24, 2017 This is a basic property, why it is so hidden. Quote Link to comment Share on other sites More sharing options...
Kowal Posted May 24, 2017 Author Share Posted May 24, 2017 Area can not be read from the Material Section (dumpallproperties (car (entsel))) Select object: Begin dumping object (class: AeccDbMaterialSection) AREA (type: double) = Failed to get value Annotative (type: bool) (LocalName: Annotative) = Failed to get value AnnotativeScale (type: AcString) (RO) (LocalName: Annotative scale) = Failed to get value Area (type: double) (RO) (LocalName: Area) = 0.000000 BlockId (type: AcDbObjectId) (RO) = 7ffffb039f0 CastShadows (type: bool) = 1 ClassName (type: AcString) (RO) = Closed (type: bool) (RO) (LocalName: Closed) = Failed to get value CollisionType (type: AcDb::CollisionType) (RO) = 1 Color (type: AcCmColor) (LocalName: Color) = BYLAYER EndParam (type: double) (RO) = 1.000000 EndPoint/X (type: double) (RO) (LocalName: End X) = 0.000000 EndPoint/Y (type: double) (RO) (LocalName: End Y) = 0.000000 EndPoint/Z (type: double) (RO) (LocalName: End Z) = 1.000000 ExtensionDictionary (type: AcDbObjectId) (RO) = 0 Handle (type: AcDbHandle) (RO) = 6690 HasFields (type: bool) (RO) = 0 HasSaveVersionOverride (type: bool) = 0 Hyperlinks (type: AcDbHyperlink*) IsA (type: AcRxClass*) (RO) = AeccDbMaterialSection IsAProxy (type: bool) (RO) = 0 IsCancelling (type: bool) (RO) = 0 IsEraseStatusToggled (type: bool) (RO) = 0 IsErased (type: bool) (RO) = 0 IsModified (type: bool) (RO) = 0 IsModifiedGraphics (type: bool) (RO) = 0 IsModifiedXData (type: bool) (RO) = 0 IsNewObject (type: bool) (RO) = 0 IsNotifyEnabled (type: bool) (RO) = 0 IsNotifying (type: bool) (RO) = 0 IsObjectIdsInFlux (type: bool) (RO) = 0 IsPeriodic (type: bool) (RO) = 0 IsPersistent (type: bool) (RO) = 1 IsPlanar (type: bool) (RO) = 1 IsReadEnabled (type: bool) (RO) = 1 IsReallyClosing (type: bool) (RO) = 1 IsTransactionResident (type: bool) (RO) = 0 IsUndoing (type: bool) (RO) = 0 IsWriteEnabled (type: bool) (RO) = 0 LayerId (type: AcDbObjectId) (LocalName: Layer) = 7ffffb05960 LineWeight (type: AcDb::LineWeight) (LocalName: Lineweight) = -1 LinetypeId (type: AcDbObjectId) (LocalName: Linetype) = 7ffffb03950 LinetypeScale (type: double) (LocalName: Linetype scale) = 1.000000 LocalizedName (type: AcString) (RO) = MaterialId (type: AcDbObjectId) (LocalName: Material) = 7ffffb064c0 MergeStyle (type: AcDb::DuplicateRecordCloning) (RO) = 1 ObjectId (type: AcDbObjectId) (RO) = 7ffffb2f480 OwnerId (type: AcDbObjectId) (RO) = 7ffffb039f0 PlotStyleName (type: AcString) (LocalName: Plot style) = ByLayer ReceiveShadows (type: bool) = 1 ShadowDisplay (type: AcDb::ShadowFlags) (RO) (LocalName: Shadow Display) = Failed to get value StartParam (type: double) (RO) = 0.000000 StartPoint/X (type: double) (RO) (LocalName: Start X) = 0.000000 StartPoint/Y (type: double) (RO) (LocalName: Start Y) = 0.000000 StartPoint/Z (type: double) (RO) (LocalName: Start Z) = 0.000000 Transparency (type: AcCmTransparency) (LocalName: Transparency) = 0 Visible (type: AcDb::Visibility) = 0 End object dump Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.