You have to select in the correct order. First select the group Multi Output.1 (Project), then the surface Blend.1. It is looking for the first selected item to be a HybridBody.
Sub CATMain()
'DESCRIPTION: Function to create normal lines to a surface
'INPUT: Select a group of projected points, and the surface.
'OUTPUT: Creates a normal line for each of the projected points.
Dim uPart As Part
Set uPart = CATIA.ActiveDocument.Part
Dim HSF As...
Nope, I would do this in surfacing. Surfacing is almost always more robust and update-able.
1. Extract the surface off of the red block.
2. Publish the surface you extracted in step 1.
3. 'Paste Special' : 'As Result with Link' the surface from the red block into the part that you are doing...
Here, I wrote you a thing to do this using VB.NET in a WinForm. The user will need CATIA open to be able to read the files and determine parent/child relationships. Other than that, I think it is pretty self explanatory how it works, but please comment back if you have questions.
Code can be...
In VB.Net this is how I get my interface to Excel.
Function GetExcel(Optional showErr As Boolean = True) As Boolean
Dim runTest As Boolean = False
For Each p As Process In Process.GetProcesses()
If p.ProcessName = "EXCEL" Then
runTest = True...
Wuzhee: Definitely cheesy workarounds, but it always does seem to work, somehow.
LWolf, is there an API command that runs 'Generate CATPart from Product'? I have never seen/heard of this in any of the documentation, but I also haven't worked on any new releases beyond R28. If so, what library...
I don't believe CATIA has this functionality. It sounds looks like you are trying to create a custom text frame; maybe look into creating this in your drafting standard? You could fake it by creating an empty text box behind the component, but that is cheesy.
TudorM has the solution. I have fully automated this process in the past but it requires using un-managed code to click the 'OK' button on the CATAllPart dialog, after calling CATIA.StartCommand, since there is no API for running that function (try searching pinvoke for details on this). Once...
Very doable!
As Little C' said , all balloons are just DrawingText with a frame, you can edit the X/Y properties of the balloon.
However be careful as the X/Y coordinates of the balloons are relative to the view that contains them so any scaling or rotation will have to be accounted for.
Sub CATMain()
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
For i = 1 To oSel.Count
Dim selItem As Object
Set selItem = oSel.Item(i).Value
If TypeName(selItem) = "DrawingText" Then
selItem.Text = UCase(selItem.Text)...
Assuming the wire is actually swept properly this should work. Also, you will need a GSD (HDX) license for the surfacing operations.
1. 'Extract' the outside surface of the wire/tube.
2. Create an 'Isoparametric curve' that runs along the length of the surface (this operation can be found...
I have an entirely different approach to this problem than was previously discussed that should allow you to easily tailor the amplitude/pitch to your hearts desire. It simplifies the problem so you only have to worry about the path/equation on a 2D plane; then revolves it around a cylinder. See...
Dim uPart As Part
Set uPart = CATIA.ActiveDocument.Part
Dim partPubs As Publications
Set partPubs = uPart.Parent.Product.Publications
For Z = partPubs.Count To 1 Step -1
Dim ThisPub As Publication
Set ThisPub = partPubs.Item(Z)
If ThisPub.Valuation.DisplayName = "" Then...
Order of operations:
- Draft the 2 surfaces independently.
- Trim the drafted surfaces together.
- Fill the corner with tangent continuity.
- Join trim with corner cap.
https://res.cloudinary.com/engineering-com/image/upload/v1670108328/tips/2022-12-03_14-52-11_emvaiv.bmp...
If you are coding in VB.Net you can use this. It will just close the open warning windows without disabling all file alerts. Kind of nice so you still see the important ones but can close the bulk once they build up. You can also pretty easily tweak it to work for incident reports, which are...