PCExtractSection in VBA

PCExtractSection in VBA

Anonymous
Not applicable
1,602 Views
4 Replies
Message 1 of 5

PCExtractSection in VBA

Anonymous
Not applicable

I want the user of my VBA code to use the command "PCExtractSection". This command generates lines based on a section of a point cloud. (This section part is already included in my code thanks to @Ed__Jobe)
When using PCExtractSection manually, a window appears in which some parameters have to be entered. Is there a way to program that these parameters are filled in with a default value that I choose in advance and that the user can adjust if necessary?

 

Thank you in advance

0 Likes
1,603 Views
4 Replies
Replies (4)
Message 2 of 5

seabrahenrique
Advocate
Advocate

Hello!

 

By default, autocad / Civil 3D follows a line where if you execute the command with a "-" before it, it runs without "input windows"

 

Note that not all commands support this function, but luckily PCExtractSection does! See:

 

cccc.png



I haven't tested the command, but I think using it with this "-" will solve your problem!

 

🙂

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi @seabrahenrique

 

With the '-' added, the function is executed without the possibility to adjust the parameters.
This is not exactly what I was looking for, but it does help to some extent. So thanks for the answer 🙂

0 Likes
Message 4 of 5

seabrahenrique
Advocate
Advocate

I understand... I have been through a case similar to the Autocad WBLOCK command.

 

The solution I found was to find the equivalent of the command via VBA itself, which in this case was:

Thisdrawing.Wblock ...

 

In your case it seems to me that this command is native to Civil 3D, correct?

I'll give you an idea that might help...

 

Reference the Civil 3D library in your VBA that has this object and in the VBA interface press the F2 key...

 

This will open the autocad object library so that you can search if there is an object or an equivalent function for PCExtraction.

 

See in my case where I find WBLOCK there:

 

solution 2.png

 

If the correct library is referenced through Tool> References, and there is a function for what you are looking for, it will undoubtedly be here. I hope this helps, saved me a few times 🙂

0 Likes
Message 5 of 5

Anonymous
Not applicable

hi @seabrahenrique 

 

Thank you for the reply and sorry for the late answer.

 

I can't seem to find the command in the libraries in VBA.

 

I think the PCExtractSection command is an AutoCAD command. In the second attached image you can see that it is only available when a point cloud is selected.

 

image.png 

 

image.png

0 Likes