Construction environment accessible via API?

Construction environment accessible via API?

RichardErnstberger
Enthusiast Enthusiast
294 Views
1 Reply
Message 1 of 2

Construction environment accessible via API?

RichardErnstberger
Enthusiast
Enthusiast

Hi all,

we have to import STEP and IGES datasets frequently.

They regularly contain wireframe geometry (labels, directions, parting lines) which end up lying in the construction environment (in groups).

What I'm looking for: write a short routine which moves all wireframe geometry from construction environment to a 3D sketch in the browser.

Searching the SDK docs (Inv. 2020) and this forum i missed anything related to construction environment.

So i have 2 questions:

- is it still true that the construction environment is not accessible by the API?

- if yes, are there any plans to add construction environment access to the API?

 

Kind regards,

Richard

0 Likes
295 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

If you use a command alias, you can activate the repair environment. The command name in this case is "CreateIFOCtxCmd"

 

Here's a screencast showing my code working: https://autode.sk/35kANcY

 

Here's the code:

'Get browser nodes from active part 
Dim oPART As PartDocument = ThisApplication.ActiveEditDocument
Dim oBP As BrowserPane = ThisApplication.ActiveDocument.BrowserPanes.ActivePane
Dim node As BrowserNode

'Look for a browser node called "Composite" and edit the node 
For Each node In oBP.TopNode.BrowserNodes
	If InStr(1, UCase(node.BrowserNodeDefinition.Label), "COMPOSITE") > 0 Then
		oPART.SelectSet.Select(node.NativeObject)
		Call ThisApplication.CommandManager.ControlDefinitions.Item("CreateIFOCtxCmd").Execute
	End If
Next

 

0 Likes