Move baseline from one corridor to another

Move baseline from one corridor to another

Anonymous
Not applicable
3,887 Views
8 Replies
Message 1 of 9

Move baseline from one corridor to another

Anonymous
Not applicable
Hi, Please guide me about following tasks, 1) How to cut one Baseline (along with all regions and all other properties) using APIs from one corridor and paste into another corridor? 2) How to move one region from one corridor to another corridor using APIs? 3) How to make a copy of baseline from one corridor to another corridor? Thanking you in advance for all your help. Regards, Mahesh
0 Likes
Accepted solutions (1)
3,888 Views
8 Replies
Replies (8)
Message 2 of 9

Jeff_M
Consultant
Consultant

I have not attempted to perform any of those tasks. However, I think for each of them you will need to create new a new Baseline and Regions by assigning the original properties to them. While it appear that this can be done, it also does not look to be a trivial task, either...there is no "easy" button. Smiley Wink

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 3 of 9

Anonymous
Not applicable

Hi Jeff,
I am creating new corridor with some of baselines and / or regions from existing corridor. I have implemented basic functionalities.
But while doing it, I could not copy following properties from original corridor to new corridor,
1) Parameters viz. Target and Overrides.
2) codes (Link, Point, Shape)
3) Feature lines with styles
4) Surfaces and its specified codes
5) Boundaries

Please guide me to set all (/any) of these properties from original corridor to new corridor.

 

Thanking you for all your help,
Mahesh

0 Likes
Message 4 of 9

joantopo
Mentor
Mentor

And why you don´t use directly the "copy" command of AutoCAD?.

 

Corridor is an instance of Corridor object, so you can do so many copies as you want.

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes
Message 5 of 9

joantopo
Mentor
Mentor

Please, give kudos here:

https://forums.autodesk.com/t5/autocad-civil-3d-ideas/copy-move-a-baseline-to-another-corridor/idc-p...

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 6 of 9

tyronebk
Collaborator
Collaborator
Accepted solution

I don't believe you can use the copy functions (at least not through the editor) but you can use the Clone() method. Example:

private string CloneCorridor( Transaction tr, Corridor corr )
{
	var newCorr = (Corridor)corr.Clone();
	newCorr.Name = corr.Name + " Clone"; // todo - check for uniqueness
	if ( newCorr.CorridorSurfaces.Count() > 0 ) {
		// todo - warn about surfaces
	}
	var bt = (BlockTable)C.Db.BlockTableId.GetObject( OpenMode.ForRead );
	var btr = (BlockTableRecord)tr.GetObject( bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite );
	btr.AppendEntity( newCorr );
	tr.AddNewlyCreatedDBObject( newCorr, true );
	return newCorr.Name;
}

Note that if there is a surface associated with the corridor it will now be associated with both corridors, but, you can remove the surface from one of the corridors without it being removed from the other (although it will be "toggled" off).

Message 7 of 9

Anonymous
Not applicable
Thank you very much.
This approach solved many of my hurdles.

Regards,
MaheshR.
0 Likes
Message 8 of 9

Anonymous
Not applicable

Hi,

 

As you suggested, I created the new corridor by using clone method.

But when I undo all, the corridor surface from original corridor gets unchecked (Corridor->Properties->Surfaces).

As per standard behavior, all properties from original corridor must be intact when I undo all processes that I have done in the last transaction.

 

Please suggest me the way so that I can restrict the change in original corridor surfaces.

 

Thanking you,

Rahul.

0 Likes
Message 9 of 9

Varun_H-K
Enthusiast
Enthusiast
hi am not sure about how to use this, could you please elaborate it!
0 Likes