Hi.
I want to do this:
* I have a current drawing file, called such as "dwg1"
- Create a new database. (OK).
-Create a new TinSurface (surface2) in that database (OK)
-Add definitions in that surface: (with CoGO Points and a boundary) (OK).
-Create a new drawing file, called "dwg2" (OK).-assign that database in that drawing file, dwg2. (OK) - create "data short cut" in dwg2.-Use in dwg1 the surface2 like external data using Data Short cut. Can I make this? Thanks in advance.
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Thanks.
I am going to make it in the current drawing then, although I have a great idea: instead of using CoGO points, I´m going to use "Point surface" so this way I avoid to create COGO points in the same drawing that it is I wanted.
Guys
Just wanting to know if there has been any progress on this and if you can at least what references a specific dwg is using.
Regards
Justin
Guys
Just wanting to know if there has been any progress on this and if you can at least find what references a specific drawing is using.
Regards
Justin
Hi Jeff,
Is this still the case?
I am looking to promote, I couldn't get the PROMOTEALLREFERENCES to work so I tried finding all the references, for example:
ObjectIdCollection SurfaceIds = CivDoc.GetSurfaceIds();
foreach (ObjectId surfaceId in SurfaceIds)
{
CivSurface oSurface = surfaceId.GetObject(OpenMode.ForRead) as CivSurface;
if(oSurface.IsReferenceObject == true)
{
//PROMOTE THEM HERE
}
}
I just cant figure out what to put in to do the promoting 🙂
Thanks for anything you know on this topic.
Regards,
Drew
Create surface
then paste the surface you want "promoted" into the new surface. PasteSurface
Delete "promoted" surface.
Rename the new surface to the name of the "promoted" surface.
Not a direct promote via the API, but it should give you the same results as promoting a surface using the UI.
Hello,
Does Autodesk exposed Data Short Cuts API to developers.
Appreciating the update from Autodesk.
It is worth if we have access of data short cuts to developers to join the broken reference using our functions.
Regards,
Rajesh
@MehtaRajesh There is also the DataShortcutManager in the AeccDataShortcutMgd assembly.
Hi Jeff,
Long time no speak.
Again many thanks for the assistance you provided
in cracking the basics of vb and c# .
Salient point choose C# over vb
I took a year off from coding, (in computing terms
my hard drive was full and I wasn't sure about
the backup.
On reboot, just like an old pc you haven't used for years
it still works but boy does it creak.
With regards to message is this still the case
regards
Trefor
@ebikoba In my response above (message #12) I show the method and properties needed to get the source drawing.
Entity ent = tr.GetObject(oId, OpenMode.ForRead, false) as Entity;
var civEnt = ent as CivDb.Entity;
if(civEnt.IsReferenceObject && civEnt.IsReferencedSourceExisting)
{
var refInfo = civEnt.GetReferenceInfo();
var sourceDwg = refInfo.SourceDrawing;
}
Love it when two lines of code replace an Entity.GetReferencePath() extension method from 2018 that iterates XML files based on AssociateShortcutProjectId (UUID), to locate the DREF Source drawing's file path. Haha
"How we think determines what we do, and what we do determines what we get."