Jump to content

Two CAD models


Recommended Posts

It is possibleto do this using PCM. It will require you to have the PCM option.

The following two functions will allow this..

clearCAD()
loadCADFile("path to model")

clearCAD() clears the current cad model from the program

loadCADFile() load a new model.

you can use something like follows to switch models ..

The first part should go in your presettings for the program.. and also in a text file in the program directory called inspection_post_load_pcm.txt - placing it in the pcm file makes sure it will run whenever the program loads so the program will always default to the 'starting' model.

	
	// find our current inspection directory
	planpath = getActualInspectionDir()
	
	// this assumes we have created a subdirectory within the program directory
	// called models to use as a place to store our different models
	// we append the directory name to the program directory we got from calypso
	modelpath = planpath + "\models\"
	
	// now create a couple of variable to point to our different models.
	leftmodel = modelpath + "leftModel.sat"
	rightmodel = modelpath + "rightModel.sat"
	
	// make sure the left model is loaded at program start
	// to make sure this actually happens before the user does anything 
	// also put it in inspection_post_load_pcm.txt
	clearCAD()
	loadCADFile(leftmodel)
The next bit goes whereever your model needs to switch..

	clearCAD()
	loadCADFile(rightmodel)
Finally put the following in your programs postsettings. This will swap back to the starting model..

	clearCAD()
	loadCADFile(leftmodel)

I have not tested this exact code but it should be pretty close.. I use something simliar to this to swap models based on what mini-plan is chosen.

I should have also stated.. this will require you to create the models subdirectory and place your two different models there prior to running.
Link to comment
https://qualityforum.zeiss.com/topic/16920-two-cad-models/#findComment-94620
Share on other sites

×
×
  • Create New...