Hi SW Community, Keith Rice Deepak Gupta Artem Taturevich
I am currently automating 2D Drawing and I had this problem in selecting planes in a section view.
Does anyone how to do this?
Thank you in advance.
Can you share some of the codes or what you've tried so far?
I used the recorded macro but it doesn't work.
boolstatus = Part.Extension.SelectByID2("PlaneZ@Internal Assembly-SectionAssembly-1-1@/DRM-1@Internal Assembly-SectionAssembly-1/Nozzle-1@DRM", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
Are you talking about 3D models section views or drawing section views (could you please attach a snapshot)? Do you want to select the plane in the model or in the drawing?
I want to select the plane in the drawing.
Try to find the pointer to the plane from the underlying model (you may traverse the feature tree or get the plane by name via IPartDoc::FeatureByName/IAssemblyDoc::FeatureByName). Then you can select the entity via View::SelectEntity.
I'm facing the same issue. I have found that the macro records an incomplete string.
In the line below, copied from your message, the drawing view name is missing after the @ sign.
boolstatus = Part.Extension.SelectByID2("PlaneZ@Internal Assembly-SectionAssembly-1-1@Drawing View Name/DRM-1@Internal Assembly-SectionAssembly-1/Nozzle-1@DRM","PLANE", 0, 0, 0, False, 0, Nothing, 0)
Adding the name should do the trick.
By the way, does anybody know how to get to the SectionAssembly number and instance number? I can't figure it out?
I came across same type of problem and i used this approach,
1.Get the sheet
2. Loop through the view
3. get the plane name in each view
4.select the plane using its name.
i came across same type of problem and i used th
Retrieving data ...