Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MAcro help needed for Project.partname on info tab

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
kevin.hammond3WX4X
457 Views, 3 Replies

MAcro help needed for Project.partname on info tab

I want to use a macro to prompt user to enter Customer part number to populate Project.Partname on the project info tab, ultimately looking to expand and include other fields on the info tab.

I dont seem to be able to use a variable to populate this field, can anyone assist please?

 

String Proj_name = ""

//check if project part name is blank, if so then prompt to name customer part number

If (project.PartName)== "" {
$Proj_name = input "Enter Customer Part Name"
EDIT PAR 'project.PartName' $Proj_name

string new_name = project.PartName
message info "Project is named " + $new_name

Labels (1)
3 REPLIES 3
Message 2 of 4

Use the widget function to get that value. I have powermill 2016 so the widget name might have changed but it should look something like:

 

string partName = $widget(ProjectNotes.Shell.ProjSettings.PartName).value

 


Edit: Nevermind, It seems that newer versions of powermill have a parameter associated with this now and so using a widget isn't useful. Rafaels answer is better.

Message 3 of 4

 

STRING Proj_name = ""
//check if project part name is blank, if so then prompt to name customer part number
If ($project.PartName)== "" {
	$Proj_name = input "Enter Customer Part Name"
	$project.PartName = $Proj_name
	message info "Project is named " + $project.PartName
}

 

Rafael Sansão

EESignature

Message 4 of 4

Thanks Rafael, just what I needed  😀

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report