Update Property Sets : How to ?

Update Property Sets : How to ?

cyberflow
Advisor Advisor
735 Views
7 Replies
Message 1 of 8

Update Property Sets : How to ?

cyberflow
Advisor
Advisor

Hi all,

I've got a project that we started in C3D 2023 and the property set were programmed for that version.

How since the past month we're migrating to 2025 and some have errors with the property sets since those DWG were made with the old unupdated template.

Is there an easy way to update the Property Sets from a 2023.dwt with the 2025.dwt ?

 

Trying to avoid having to go into each drawing to copy/paste the VBscript code.

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
736 Views
7 Replies
Replies (7)
Message 2 of 8

cyberflow
Advisor
Advisor

This is what i've found that works :

Simply drag and dropping from a more recent drawing toward the old drawing the property set folder in the Style manager : 

cyberflow_0-1740756957678.png


And then clicking "Overwrite" to overwrite the old definition : 

cyberflow_1-1740757004197.png



Was more wondering if there was a more basic commandline method ?

P.S. Sorry for the french printscreens

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Message 3 of 8

MikeEvansUK
Advisor
Advisor

Hi cyberflow.

I think only the vernums changed in the code so target 25.0 not 24.3..

 

I used a case select style routine used in all functions for the vernum (and pipes/landui…)  to set the version so the same psets would work in any version and to update you just add the next number sequence in the template. Search in the forum I posted recently on this.

 

I just link the pset template into the drawings as a reference template and it works itself out. Course you’ll need to mod this time but next time it’s just add the new version number (vernum).

 

Not checked and could have changed tho’ seems everything’s different in 25 so that’s Mondays job.

 

m

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

0 Likes
Message 4 of 8

cyberflow
Advisor
Advisor

@MikeEvansUK Thx for the input

I was wondering, do you have a snippet of that code you use ?
I did search and havent found it yet

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Message 5 of 8

cyberflow
Advisor
Advisor
0 Likes
Message 6 of 8

michael
Enthusiast
Enthusiast

See Below. Can't remember where I got it from. Someone Else's suggestion.

Set these up as separate elements for _AecX and _XUILand then reference them. You'll need them for both pipes / manholes in some instances, swap depending to what you are doing (review the Customisation Guide for compoenents of each.).

 

Then use them as needed, example below.

 RESULT="-"

On Error Resume Next

Set oApp=GetObject(, "AutoCAD.Application")

Set oCivilApp=oApp.GetInterfaceObject("[_XUILand]")

Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")

RESULT=obj.Name

 

RESULT = "--"
On Error Resume Next
Set app=GetObject(, "AutoCAD.Application")
If InStr(app.Version, "24.3") > 0 Then 
RESULT = "AecX.AecBaseApplication.8.6"
ElseIf InStr(app.Version, "24.2") > 0 Then 
RESULT = "AecX.AecBaseApplication.8.5"
ElseIf InStr(app.Version, "24.1") > 0 Then 
RESULT = "AecX.AecBaseApplication.8.4"
ElseIf InStr(app.Version, "24.0") > 0 Then 
RESULT = "AecX.AecBaseApplication.8.3"
ElseIf InStr(app.Version, "25.0") > 0 Then 
RESULT = "AecX.AecBaseApplication.8.7"
End If

 

RESULT = "--"
On Error Resume Next
Set app=GetObject(, "AutoCAD.Application")
If InStr(app.Version, "24.3") > 0 Then 
RESULT = "AeccXUiLand.AeccApplication.13.6"
ElseIf InStr(app.Version, "24.2") > 0 Then 
RESULT = "AeccXUiLand.AeccApplication.13.5"
ElseIf InStr(app.Version, "24.1") > 0 Then 
RESULT = "AeccXUiLand.AeccApplication.13.4"
ElseIf InStr(app.Version, "24.0") > 0 Then 
RESULT = "AeccXUiLand.AeccApplication.13.3"
ElseIf InStr(app.Version, "25.0") > 0 Then 
RESULT = "AeccXUiLand.AeccApplication.13.7"
End If

 

Mike

0 Likes
Message 7 of 8

cyberflow
Advisor
Advisor

Hi @michael !

Thanx for the share

I'm already using this code but i'm trying to find something more dynamic that don't needs to be maintained with time

Frank Freitas

CAE/CAD/BIM Coordinator & Support Specialist

LinkedIn
0 Likes
Message 8 of 8

MikeEvansUK
Advisor
Advisor

Hi @cyberflow, yes it would be nice not to have to manage this wouldn't it.

 

I have long tinkered with the idea of creating a .com exposed plugin which would manage the connections so you use that.

I know you can derive the version numbers from the Registry via .Net which could then be passed via a function to the Vb code.

 

Not sure if the above method would actually work as the PSets use VBScript but as other VB.Com functionality exists it seems sensible that it would.

If that works, you could also extract more information easier than using the vbscript code direct.

 

Mike

 

Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB