I couldn't figure out how to find the file where dref is targeting, so I just manually select the source file.
Quite a bit more difficult with LISP than with .NET, but the files you're after are the same.
<RoamableRootPrefix> + "Project Management\\ShortcutFolders.xml will provide the WorkingFolder/ShortcutFolder XmlNode's path XmlAttribute's string value, which then allows you to locate <ShortcutFolderPathValue> + "\\_shortcuts\\<YourC3dObjectType>\\" in order to iterate the XML files contained within, and WCMATCH the XML file with the "<C3DObjectName>_<GUID>.xml" file naming convention.
At this point, you open the "<C3DObjectName>_<GUID>.xml" file, and obtain ProjectInfo/Shortcuts/Shortcut/DwgRelPath XmlNode's path XmlAttribute's value, or ProjectInfo/Shortcuts/Shortcut/Criteria/File XmlNode's name XmlAttribute's value for full file path.
HTH
Pretty slick. I didn't realize that info was stored anywhere. Of course, without the ability to set the style, I've hit a brick wall. I've put learning to code in .net off for too long because I was "busy" or just being lazy, and now it's a real issue.
Can the structure/pipe style be successfully set in the .net api?
Time to start studying.
Thanks, guys.
Yeah, for an internal database, you'd think the host drawing would simply reference the parent drawing (but no). Haha
Not sure if .NET API can do that (yet), but just happen to know the best non-Autodesk Civil 3D developer there is - I'll see what he thinks - if it can, maybe we'll slap a LispFunction Method together? *not sure*
Cheers
Hell, I wish you could click on a surface, etc. dref and it would tell you where it's referencing.
Man, I would be forever appreciative, if it works and you have the time. If it isn't available in dotNET, does that mean it could be possible with C+? I know I read somewhere about certain properties weren't available in the NET api, but could be accomplished using COM. The ability to set it with COM is there, it just doesn't seem to work when accessing it via LISP.
This would solve my issue with pipe networks not updating dref styles, and breaking a part's connection to the list if you edit an optional property at the object level. The rest of the code I posted works w/o issue, I just can't get it to set the damn structure style.
This has been the wake up call I've needed and I'll be spending the weekend digging into dotNET. Starting advice?