Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Browsing all 7260 articles
Browse latest View live

RE: [V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

The following members of ToolData are returned with a NULL value:pKeyinStr,pTaskId,pMainTaskPathStill hoping to find a way to return the keyin string....

View Article


RE: [V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

Please post a code snippet.

View Article


RE: Turn off level in View, C++

I see a few items that may or may not be an issue: - You're searching for the LevelID for the given name (In the active model only) and what happens when that level is not found? - In the first code...

View Article

RE: [V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

[quote user="Jon Summers"]Please post a code snippet.[/quote]static int dumpNamedToolDataNode (NamedToolDataNodeP toolDataNode, char* prefix, int dimension, int group) { ToolData *data =...

View Article

RE: Turn off level in View, C++

[quote user="HDR_Coder"]wstring widestr = wstring(s.begin(), s.end());[/quote]If strings were that simple, they would not have caused so many people so much trouble over the years.  std::wstring is a...

View Article


RE: Turn off level in View, C++

I have a program that lists the names and ids for the levels. If I know the levelID, the first program works. The problem is with my function...

View Article

RE: Turn off level in View, C++

[quote user="HDR_Coder"] mdlLevel_getIdFromName(&levid,modelRef,LEVEL_NULL_ID,&levelName);[/quote]How is variable levelName declared?  The function is expecting a const pointer to a wide...

View Article

RE: Turn off level in View, C++

Excellent solution Jon!The code is now up and working.  Here is the source code:wchar_t* convertStringto_wchar_t(string s) { const char * c = s.c_str(); const size_t cSize = strlen(c) + 1; wchar_t* wc...

View Article


RE: Turn off level in View, C++

Memory Leak![quote user="HDR_Coder"]MSWCharP levelName; levelName = convertStringto_wchar_t(line); DgnModelRefP modelRef = mdlModelRef_getActive();[/quote]Your conversion function allocates memory, but...

View Article


RE: [V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

Can you confirm the NamedToolData from a/your custom tool (path) that saved in a dgnlib? If so, pKeyinStr should have a value. Bob

View Article

RE: [V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

I went and ran the code (essentially the code example snippet in the .fdf file) in DEBUG mode. Once mdlNamedToolDataNode_getToolData() sets the pointer to ToolData, I "break" on the next statement so I...

View Article

[V8i C++] Dumping Tool Data via mdlNamedToolDataNode_getToolData()

I'm traversing the ListModel of tasks from mdlNamedTool_populateTaskListModel(). After I load the tool (mdlNamedToolDataNode_loadByPath(), I call mdlNamedToolDataNode_getToolData(). I'm attempting to...

View Article

RE: Turn off level in View, C++

Very good solution.  Here is Jon's suggestion in the source code:std::wstring convertStringto_wchar_t(string s) { const size_t cSize = s.length() + 1; wchar_t* wc = new wchar_t[cSize]; mbstowcs(wc,...

View Article


RE: Turn off level in View, C++

[quote user="HDR_Coder"]Why couldn't I dereference my pointer later in the code?[/quote]I assume that you mean deallocate?Because, as you've demonstrated, it's easy to forget to delete something that...

View Article

RE: Turn off level in View, C++

I just meant that mdlLevel_getIdFromName, for the fourth argument takes an MSWCharCP, but mdlLevel_getIdFromName(&levid, modelRef, LEVEL_NULL_ID, levelName.c_str()); gives it a const char *. I...

View Article


RE: Turn off level in View, C++

No, it doesn't give it a const char *. It gives a const wchar_t *. And char != wchar_t (unicode vs. multibyte)

View Article

RE: Turn off level in View, C++

std::basic_string is a template class.  Method std::basic_string::c_str () returns a const pointer to the start of the contained character string.std::string is a typedef of std::basic_string that...

View Article


RE: Turn off level in View, C++

I have modified the program to hide levels for the active model reference or any attached model reference.  Right now you can only do one .dgn at a time.  Here is the source code:std::wstring...

View Article

Turn off level in View, C++

I have a snippet of code that is supposed to read a textfile with level names and turn those levels off.Here is my first attempt:wchar_t convertStringto_wchar_t(string s) { wstring widestr =...

View Article

Image may be NSFW.
Clik here to view.

RE: How do I hide a ListBox row?

Identify Your PlatformPlease identify the version of MicroStation, or other product such as PowerDraft, that you are using: MicroStation CONNECT or MicroStation V8i.The APIs supplied with MicroStation...

View Article
Browsing all 7260 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>