← Inbox

C3D-0464 · Reflect layout copy APIs (read-only) [C3D-0465] done

List LayoutManager and Database methods with Layout/WblockClone/Insert to pick the real cross-dwg layout import call.

Script file
C3D-0464.cs
Target
260904 - 920 W Sandtown Rd SW.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


foreach(var t in new[]{typeof(LayoutManager),typeof(Database)}){
  foreach(var m in t.GetMethods()){
    var n=m.Name;
    if(n.IndexOf("Layout",StringComparison.OrdinalIgnoreCase)>=0 || n=="WblockCloneObjects" || n=="Insert"){
      var ps=new System.Collections.Generic.List<string>(); foreach(var p in m.GetParameters()) ps.Add(p.ParameterType.Name+" "+p.Name);
      Log(t.Name+"."+n+"("+string.Join(", ",ps)+")");
    }
  }
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260711 - 281 Maranatha Trail, Lawrenceville, GA 30045, USA\260711 - 281 Maranatha Trail R2.dwg
Message
Executed C3D-0464 (0 entities touched).
Entities
Duration
548 ms
Civil 3D
25.0.0.0

Log

LayoutManager.get_CurrentLayout()
LayoutManager.set_CurrentLayout(String newName)
LayoutManager.SetCurrentLayoutId(ObjectId layoutId)
LayoutManager.GetLayoutId(String name)
LayoutManager.CopyLayout(String copyName, String newName)
LayoutManager.DeleteLayout(String deleteName)
LayoutManager.CreateLayout(String newName)
LayoutManager.RenameLayout(String oldName, String newName)
LayoutManager.CloneLayout(String copyName, String newName, Int32 newTabOrder)
LayoutManager.get_LayoutCount()
LayoutManager.LayoutExists(String name)
LayoutManager.add_LayoutCreated(LayoutEventHandler value)
LayoutManager.remove_LayoutCreated(LayoutEventHandler value)
LayoutManager.add_LayoutToBeRemoved(LayoutEventHandler value)
LayoutManager.remove_LayoutToBeRemoved(LayoutEventHandler value)
LayoutManager.add_LayoutRemoved(LayoutEventHandler value)
LayoutManager.remove_LayoutRemoved(LayoutEventHandler value)
LayoutManager.add_AbortLayoutRemoved(LayoutEventHandler value)
LayoutManager.remove_AbortLayoutRemoved(LayoutEventHandler value)
LayoutManager.add_LayoutToBeCopied(LayoutEventHandler value)
LayoutManager.remove_LayoutToBeCopied(LayoutEventHandler value)
LayoutManager.add_LayoutCopied(LayoutCopiedEventHandler value)
LayoutManager.remove_LayoutCopied(LayoutCopiedEventHandler value)
LayoutManager.add_AbortLayoutCopied(LayoutEventHandler value)
LayoutManager.remove_AbortLayoutCopied(LayoutEventHandler value)
LayoutManager.add_LayoutToBeRenamed(LayoutRenamedEventHandler value)
LayoutManager.remove_LayoutToBeRenamed(LayoutRenamedEventHandler value)
LayoutManager.add_LayoutRenamed(LayoutRenamedEventHandler value)
LayoutManager.remove_LayoutRenamed(LayoutRenamedEventHandler value)
LayoutManager.add_AbortLayoutRename(LayoutRenamedEventHandler value)
LayoutManager.remove_AbortLayoutRename(LayoutRenamedEventHandler value)
LayoutManager.add_LayoutSwitched(LayoutEventHandler value)
LayoutManager.remove_LayoutSwitched(LayoutEventHandler value)
LayoutManager.add_LayoutsReordered(EventHandler value)
LayoutManager.remove_LayoutsReordered(EventHandler value)
LayoutManager.add_LayoutsRefresh(EventHandler value)
LayoutManager.remove_LayoutsRefresh(EventHandler value)
Database.get_LayoutDictionaryId()
Database.Insert(String sourceBlockName, String destinationBlockName, Database dataBase, Boolean preserveSourceDatabase)
Database.Insert(Matrix3d transform, Database dataBase, Boolean preserveSourceDatabase)
Database.Insert(String blockName, Database dataBase, Boolean preserveSourceDatabase)
Database.WblockCloneObjects(ObjectIdCollection identifiers, ObjectId id, IdMapping mapping, DuplicateRecordCloning cloning, Boolean deferTranslation)

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.