AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hola a todos, Cómo acceder a las propiedades de los objetos en plant3d, por lisp o por campo.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
aluison2kLKPBT
70 Views, 2 Replies

Hola a todos, Cómo acceder a las propiedades de los objetos en plant3d, por lisp o por campo.

Por ejemplo, un objeto "Pipe"  tiene las mismas propiedades que en una "Linea" o un "Circulo" pero además, tiene muchas otras propiedades propias,  estas propiedades son las que necesito utilizar, y  no se pueden acceder a ellas desde la lista de campos.  Agradezco mucho su ayuda

2 REPLIES 2
Message 2 of 3
DVaquand
in reply to: aluison2kLKPBT

Hello @aluison2kLKPBT 

 

In Autolisp you can have limited access to certain properties and only read access.
Here is an example that reads the diameter of a selected component and displays the list of properties

 

(defun c:AP3D_ND_Proprerty ( / Select_Obj)
  (vl-load-com)
  (setq Select_Obj (vlax-ename->vla-object (car (entsel))))
  (print (strcat "ND = " (vlax-get-property Selec_Obj "size")))
  (princ "\n============================ Dump propriétés ================================\n")
  (vlax-dump-object Select_Obj)
  (princ)
  )

 

Here are the different properties from the dump

 

============================ Dump propriétés ================================
; IAcPnP3dPipe: IAcPnP3dPipe Interface
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff7cdf9a178>
; CutLength (RO) = "1730.778568"
; Document (RO) = #<VLA-OBJECT IAcadDocument 00000164cefb5f88>
; EndType (RO) = "PL"
; EntityTransparency = "ByLayer"
; Facing (RO) = ""
; Handle (RO) = "56E"
; HasExtensionDictionary (RO) = 0
; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0000016cd66f8928>
; InsulationThickness (RO) = ""
; InsulationType (RO) = ""
; Layer = "0"
; LineNumberTag (RO) = ""
; Linetype = "ByLayer"
; LinetypeScale = 1.0
; Lineweight = -1
; Material = "ByLayer"
; MaterialCode (RO) = ""
; ObjectID (RO) = 42
; ObjectName (RO) = "AcPpDb3dPipe"
; OwnerID (RO) = 43
; PartFamilyLongDesc (RO) = "PIPE, SEAMLESS, PE, ASME B36.10"
; PlotStyleName = "Color_2"
; PnPClassName (RO) = "Pipe"
; PnPGuid (RO) = "579e9e5f-244e-48e6-9f92-0143aba1806a"
; PnPMaterial (RO) = ""
; PressureClass (RO) = ""
; Schedule (RO) = ""
; Service (RO) = ""
; Size (RO) = "4\""
; Spec (RO) = "CS900"
; Status (RO) = "New"
; Tag (RO) = ""
; TieInNumber (RO) = ""
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 00000164c4b3abe0>
; Visible = -1
; WallThickness (RO) = ""

 

To go further into properties you have to switch to DotNet language
You have examples by loading the SDK
https://aps.autodesk.com/developer/overview/autocad-plant-3d-and-pid

 

== French ==

 

En Autolisp vous pouvez avoir un accès limité à certaines propriétés et seulement en lecture.
Voici un exemple qui lit le diamètre d'un composant sélectionné et affiche la liste des propriétés

 

Pour allez plus loin dans des propriétés il faut passer en langage DotNet
Vous avez des exemples en chargeant le SDK
https://aps.autodesk.com/developer/overview/autocad-plant-3d-and-pid

 

Cordialement
Dominique VAQUAND
www.dovaq.fr

Cette publication vous a-t-elle été utile ? N’hésitez pas à attribuer la mention J’aime à cette publication.
Avez-vous obtenu la réponse à votre question ? Cliquez ensuite sur le bouton ACCEPTER LA SOLUTION.

EESignature

Message 3 of 3

Thank you very much, that is the way;

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report