Author Topic: Edit Multiple Different 3D Objects  (Read 1050 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2544
  • I can't remeber what I already asked! I need help!
Edit Multiple Different 3D Objects
« on: June 03, 2021, 03:52:56 PM »
I saw a routine very similar this one. I thought it was a good idea to be able to activate one routine which could open properties of the select objects. However, I am trying to find a way where I can activate the "LabelStyleEdit" command, so when the label is picked, this command would allow me to change the label style.

Hope this makes some sense.

Code: [Select]
(defun C:E3D (/ SSET C3D$ )
 (setq
  sset (entsel "\nSelect Civil3D Object to edit: ")
  C3D$ (cdr (assoc 0 (entget (car sset))))
 )
 (cond
;;Pipe Network
  ((= C3D$ "AECC_PIPE")(command "EditPipeProperties" sset))
  ((= C3D$ "AECC_PIPE_LABEL")(C:LAB) sset)
  ((= C3D$ "AECC_STRUCTURE")(command "EditStructureProperties" sset))
  ((= C3D$ "AECC_STRUCTURE_LABEL")(C:LAB) sset)
  ((= C3D$ "AECC_STRUCTURE_PROFILE_LABEL")(C:LAB) sset)
  ((= C3D$ "AECC_PIPE_PROFILE_LABEL")(C:LAB) sset)
;;Surface
  ((= C3D$ "AECC_TIN_SURFACE")(command "EditSurfaceProperties" sset))
  ((= C3D$ "AECC_SURFACE_ELEVATION_LABEL")(command "LabelStyleEdit" sset))
;;Profiles
  ((= C3D$ "AECC_PROFILE_VIEW")(command "EDITGRAPHPROPERTIES" sset))
  ((= C3D$ "AECC_GRAPH_PROFILE_NETWORK_PART")(command "_AeccEditStructureProps" sset))
;;Alignments
  ((= C3D$ "AECC_ALIGNMENT")(command "_editalignmentproperties" sset))
;;Parcels
  ((= C3D$ "AECC_PARCEL")(command "EditParcelProperties" sset))
;;Catchments
  ((= C3D$ "AECC_CATCHMENT")(command "EditCatchmentAreaProperties" sset))
  ;;((= C3D$ "AECC_CATCHMENT_LABEL")((alert "this is the label") sset))
;;Pressure Pipes
  ((= C3D$ "AECC_GRAPH_PROFILE_PRESSURE_PART")(command "EditPressuePartProps" sset))
  ((= C3D$ "AECC_FITTING")(command "EditFittingProps" sset))
  ((= C3D$ "AECC_PRESSUREPIPE")(command "EditPressurePipeProps" sset))
  ((= C3D$ "AECC_APPURTENANCE")(command "EditAppurtenanceProps" sset))
 )
 (princ))
Civil3D 2020

Jeff_M

  • King Gator
  • Posts: 4023
  • C3D user & customizer
Re: Edit Multiple Different 3D Objects
« Reply #1 on: June 03, 2021, 05:08:39 PM »
What is C:LAB?

MSTG007

  • Gator
  • Posts: 2544
  • I can't remeber what I already asked! I need help!
Re: Edit Multiple Different 3D Objects
« Reply #2 on: June 04, 2021, 07:22:16 AM »
Sorry Jeff, I forgot to add this.

I found a routine that you did, which allowed to select a parcel and label all segments. . . I was curious if I could get the simple (command ... call to work with the label style. It kinda did. lol.


Code: [Select]
vl-load-com
(defun c:LAB (/ SSET HND LAY OBJ C3D C3DDOC )
  ;(princ "\nSelect Parcel on layer to label: ")
  (setq obj '(0 . "AECC_PARCEL"))
  (if (setq sset (ssget ":S" (list obj)))
    (progn
      (setq hnd (ssname sset 0)     
    lay (cdr (assoc 8 (entget hnd)))
      )
      (setq sset (ssget "_X" (list obj (cons 8 lay))))
      (setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
(if vlax-user-product-key
  (vlax-user-product-key)
  (vlax-product-key)
)
)
    C3D (vl-registry-read C3D "Release")
    C3D (substr C3D
1
(vl-string-search
  "."
  C3D
  (+ (vl-string-search "." C3D) 1)
)
)
    C3D (vla-getinterfaceobject
  (vlax-get-acad-object)
  (strcat "AeccXUiLand.AeccApplication." C3D)
)
      )
      (setq C3Ddoc (vla-get-activedocument C3D))
    )
  )
  (command sset "LabelStyleEdit")
  (princ)
)
Civil3D 2020