My guess is you cannot count the number of leaders because there is no Count method. Try removing the If and end if.
DrawingLeaders (Collection)
IUnknown
|
+---IDispatch
|
+---CATBaseUnknown
|
+---CATBaseDispatch
|
+---Collection
|...
I agree with itsmyjob, you need to take a look at your bodies collection after you reassign the partbody.
Prior to pasting, if there is only one body in the part, just set that to a variable and delete it after you paste
Set oBodyToDelete = oPart.Bodies.Item(1)
'Paste...
There really isn't enough info here to be able to answer this.
It sounds like you want to set a parameter value based on what someone types into an input box.
It would be something like
Jump.ValuateFromString("50mm")
So you would need to add the "mm" onto the end if your user is only entering...
If you only want to run Measure Inertia once on a part that is in the structure multiple times, check the part for the feature before running the command.
You could do a search for "InertiaVolume.1" inside the part or go after it directly if it is available in the API documentation.
If it is...
Are you talking about loading parts that have publications which feed external references in a part you have loaded?
Based on my experience, external reference paths are not exposed. You also cannot tell if an external reference is connected or not. In some cases you can find the document, but...
It would be easier to help if you said what you want the macro to do and if you had a picture of your specification tree so we can see the structure. Will the tree look the same all the time?
1. The first "element" in the line is a parameter because the line likely has no history. Does the line...
...can change this)
' -Create annotations for the coordinates
'If you move a point on surface, the annotation updates to the new point coordinates
'*If you run it twice it will put more parameters under the points
'*Had to comment out setting oPartProduct because an open part doesn't have an...
If the middle section can be circular, I woould Look up DMU Fitting Tracks in help. You can create several translations and rotations (tracks) using the compass > edit then put them together into one motion.
If you reference part A into part B, you cannot reference points from part B back into part A...that creates a circular reference...so I am a bit confused on that.
But regardless of that issue...
If you want the annotation to update, you need to have parameters for the XYZ coordinates and...
How are you closing CATIA? If you use the RED X in the upper Right corner, your CATSettings will not be saved. You need to select File>Exit to save CATSettings.
I tried for quite a while in VBA to find:
If an external reference is bad/not connected
The parent of an external reference
From my experience:
Differentiating between a good and bad external reference is not an exposed API...You would likely need CAA to do this
Getting the parent of the...
So you copy the points in and can later change the coordinates of the points that were copied in?
If you want the annotation to update you need to make length parameters that are tied to the coordinates of the points, then attribute link those parameters to your annotation.
You can create...
I am running a windows 7 laptop, I have had wildfire 4 student edition installed for years and it has run fine. Now if I open the program, it displays then closes. I figured out if i take my pc offline, it will not close. Why would it do that all the sudden?
Use the search function to hide what you don't want to see:
[ol 1]
Press ctrl+F on the keyboard
Select the workbench and type of feature you want to find and hide
Select where you want to search (everywhere, in selection, etc.)
Press the search and select button (binoculars with pointer)
All...
JeniaL's suggestion will be very fast because it just renumbers all the bodies without any comparison. Because you want a comparison, it can slow your macro down considerably.
I didn't test the following code, but if you rename something, I would put a unique string in the new name so you can...
I looked in the chm file under drawing documents and found the following:
oText.FrameType = catRectangle
It looks like the options for other frames are:
catNone,
catRectangle,
catSquare,
catCircle,
catScoredCircle,
catDiamond,
catTriangle,
catRightFlag,
catLeftFlag...