Different Property Sets

Different Property Sets

mehsan
Advocate Advocate
8,085 Views
32 Replies
Message 1 of 33

Different Property Sets

mehsan
Advocate
Advocate

Hi, Dear All

If i have different property sets in Civil and i want to access them accordingly automatically what can i do or what Vb.Net Or VLisp code i can give like.

1. Pipe Name

2. Pipe Northing Start Point

3. Pipe Easting Start Point

4. Material of Pipe

5. Invert Level at Start and at End

6. Pipe Length 

7. Pipe Diameter

etc 

 

Similarly for structures

Thanks in Advance 

 I am windows 10 and VERSION 13.3.2105.0 CIVIL 3d 2021.2 UPDATE 

BUILD ON: R.47.0.0 AUTOCAD 2021

24.0.30.14 AUTODESK AUTOCAD MAP 3D 2021

8.3.53.0 AUTOCAD ARCHITECTURE 2021

0 Likes
Accepted solutions (2)
8,086 Views
32 Replies
Replies (32)
Message 2 of 33

Wojtek_Garczewski
Autodesk
Autodesk

Hi @mehsan 

 

Please see THIS forum thread regarding what values can be used to retrieve information from Pipe Network and populate it via Property Data Sets. In the mentioned thread, you can find LISP file (DUMP_OBJ.LSP) that lists all properties that can be used.

Also please check on the following article that explains more about the topic:
How to use property sets to populate a pipe with its upstream and downstream structures in Civil 3D

 

Thanks,
Wojtek
______________________________________________________________

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!



Wojtek G.

Product Owner for Civil 3D
Civil Engineering Solutions
0 Likes
Message 3 of 33

mehsan
Advocate
Advocate

But how can i get my required values from the dump operations and put them back to my customized Property sets. See in the image attach 

0 Likes
Message 4 of 33

Udo_Huebner
Mentor
Mentor
Accepted solution

See here to get the Pipe name

https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-...

If you post your sample DWG, I put the code for you at the right Property.

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 5 of 33

mehsan
Advocate
Advocate

I have tried many times with this but never succeeded, Please i am sending the version of Civil 3d Version parameters , Please advice  

0 Likes
Message 6 of 33

mehsan
Advocate
Advocate

It does not work with VBA Code may be the version problem can you check and let me know .

Thanks

0 Likes
Message 7 of 33

Udo_Huebner
Mentor
Mentor

There is no DWG attached from you. So just to say that you have installed the latest Civil Update, but the updates for AutoCAD, ACA and MAP are still missing.

udo_0-1617606535641.png

 

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 8 of 33

mehsan
Advocate
Advocate

This is the link to Civil 3D File , Please you can check the files and see the Property Sets other than Omni classes . see in the snap.

https://drive.google.com/file/d/15slWcwEzZ3UhXgrFeG_w709VwIMtc32e/view?usp=sharing

mehsan_0-1617609721835.png

 

0 Likes
Message 9 of 33

Udo_Huebner
Mentor
Mentor

Hello @mehsan 

Oh, a 154 MB drawing, I was expecting an almost empty drawing containing only your Property Set definitions with a maximum of 3 structures and 2 pipes.

Anyway, your Property Set definition "Storm Network (Pipe)" currently contains only "real" and "text" definitions.

However, you need to use "formula" definitions.

See this well documented article by @samir_rezk 
https://forums.autodesk.com/t5/civil-3d-forum/property-sets-and-invert-elevation/td-p/7932587
And here you can see some screenshots how to use "formula" definitions instead of "text" definitions.

https://forums.autodesk.com/t5/civil-3d-forum/property-set-data-for-pipes/td-p/7727538

 

 

Gruß Udo Hübner (CAD-Huebner)
Message 10 of 33

mehsan
Advocate
Advocate

I have tried all these threads but it does not works with me can you give me one example from my drawing which i send to u.

Thanks 

0 Likes
Message 11 of 33

Udo_Huebner
Mentor
Mentor

I have only Civil 3D 2021 German Language installed. I prepare an example for you in english but it will take an hour.

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 12 of 33

mehsan
Advocate
Advocate

I will be so grateful if you can because i am struggling since few days for this. You can also tell me with formula and with the lisp below. where i am able to extract all the required property sets but i am unable to insert them Vlax-Put-Property Sentence. 

 

The version with me is AeccXUILand.dll = (13.3.2105.0)

 

 

(defun c:test1 ( / ss pipeobj sp ep dia)
(princ "\nSelect Pipe Object: ")
(setq ss (ssget ":s" '((0 . "AECC_PIPE"))))
(if ss
(progn
(setq pipeObj (vlax-ename->vla-object (ssname ss 0)))

(setq Pipe-Deep (Vlax-vla-object->ename Pipeobj))

(setq sp (vlax-safearray->list (vlax-variant-value (vlax-get-property pipeObj 'PointAtParam 0))))
(setq ep (vlax-safearray->list (vlax-variant-value (vlax-get-property pipeObj 'PointAtParam 1))))
(setq dia (vlax-get-property pipeObj 'InnerDiameterOrWidth))
(setq PipeName (vlax-get-property pipeObj 'Name))

(setq Pipe_North_Start_Pt (rtos (cadr sp) 2 2))
(setq Pipe_Easting_Start_Pt (rtos (car sp) 2 2))
(setq Start_Invert_Level (rtos (- (caddr sp)(/ dia 2.0)) 2 2))

(setq Pipe_Northing_End_Pt (rtos (car ep) 2 2))
(setq Pipe_Easting_End_Pt (rtos (car ep) 2 2))
(setq End_Invert_Level (rtos (- (caddr ep)(/ dia 2.0)) 2 2))

(setq Pipe_length (Distance sp ep))
(setq Pipe_Name (vlax-get-property pipeObj 'Description))
(setq Pipe_Material (vlax-get-property pipeObj 'Material))
(setq Pipe_3dLength (vlax-get-property pipeObj 'Length3D))


Here is the sentence where i am facing the problem.
(vlax-put-property pipeobj 'PipeName "TEXT")


)
)
(princ)

 

mehsan_0-1617620927349.png

 


)

0 Likes
Message 13 of 33

Udo_Huebner
Mentor
Mentor

First I have to repair your drawing and reduce size. Your posted drawing contains 2876000 Objects - why?

Do you know, that the drawing contains 196565 registered applications?

Delete them using command

Command: _-PURGE _RegApp *

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 14 of 33

mehsan
Advocate
Advocate

OK Thanks

0 Likes
Message 15 of 33

Udo_Huebner
Mentor
Mentor
Accepted solution

I've spent more than an hour trying to reduce the size of your uploaded file to copy the Preperty Sets, but so far no luck with that.

Instead, I recorded a short screencast to show you how to get the pipename in property set definitions.

https://autode.sk/3rNbQhW

 

 

 

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 16 of 33

mehsan
Advocate
Advocate

Really Thanks you i got it , May God Bless you.

Thanks Really again

0 Likes
Message 17 of 33

mehsan
Advocate
Advocate

I want one last Favour how can i transfer the Property set Parameters to Another drawing.

Thanks

0 Likes
Message 18 of 33

Udo_Huebner
Mentor
Mentor

Simply open source and target drawing, then start

Command: PROPERTYSETDEFINE

and use Drag & drop

 

Gruß Udo Hübner (CAD-Huebner)
0 Likes
Message 19 of 33

mehsan
Advocate
Advocate

What about if i have 2021.2 Update Version of Civil 3d Thans what will i do because it is not working for this version.

0 Likes
Message 20 of 33

Udo_Huebner
Mentor
Mentor

The VB Code is language dependent (German, English...) and Civil version dependent 2021, 2022 ...

Use this code to get the Pipe Name in Civil 3D 2021.2 English

 

RESULT = "--"
On Error Resume Next
Set oApp = GetObject(, "AutoCAD.Application")
Set oCivilApp = oApp.GetInterfaceObject("AeccXUiPipe.AeccPipeApplication.13.3") '2021
Set obj = oCivilApp.ActiveDocument.HandleToObject("[Handle]")
RESULT=obj.Name

 

Important, create a Property named "Handle" first, then replace Text "Handle" with Property "Handle"

Post a Screenshot

 

Gruß Udo Hübner (CAD-Huebner)
0 Likes